Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format ELF
- extrn __bb_basic_basic
- extrn __bb_blitz_blitz
- extrn bbEmptyArray
- extrn bbNullObject
- extrn bbStringClass
- extrn bbStringConcat
- extrn bbStringFromInt
- extrn brl_filesystem_LoadDir
- extrn brl_standardio_Print
- public _bb_main
- public bb_files
- section "code" executable
- _bb_main:
- push ebp
- mov ebp,esp
- sub esp,12
- push ebx
- push esi
- push edi
- cmp dword [_20],0
- je _21
- mov eax,0
- pop edi
- pop esi
- pop ebx
- mov esp,ebp
- pop ebp
- ret
- _21:
- mov dword [_20],1
- mov dword [ebp-8],0
- mov dword [ebp-4],0
- call __bb_blitz_blitz
- call __bb_basic_basic
- mov eax,dword [_11]
- and eax,1
- cmp eax,0
- jne _12
- push 1
- push _3
- call brl_filesystem_LoadDir
- add esp,8
- inc dword [eax+4]
- mov dword [bb_files],eax
- or dword [_11],1
- _12:
- mov edi,dword [bb_files]
- mov eax,edi
- add eax,24
- mov ebx,eax
- mov eax,ebx
- add eax,dword [edi+16]
- mov dword [ebp-12],eax
- jmp _4
- _6:
- mov esi,dword [ebx]
- add ebx,4
- cmp esi,bbNullObject
- je _4
- push esi
- call brl_standardio_Print
- add esp,4
- mov eax,dword [esi+8]
- add dword [ebp-8],eax
- add dword [ebp-4],1
- _4:
- cmp ebx,dword [ebp-12]
- jne _6
- _5:
- push dword [ebp-4]
- call bbStringFromInt
- add esp,4
- push eax
- push _7
- push dword [ebp-8]
- call bbStringFromInt
- add esp,4
- push eax
- push _7
- mov eax,dword [bb_files]
- push dword [eax+16]
- call bbStringFromInt
- add esp,4
- push eax
- call bbStringConcat
- add esp,8
- push eax
- call bbStringConcat
- add esp,8
- push eax
- call bbStringConcat
- add esp,8
- push eax
- call bbStringConcat
- add esp,8
- push eax
- call brl_standardio_Print
- add esp,4
- mov eax,0
- jmp _8
- _8:
- pop edi
- pop esi
- pop ebx
- mov esp,ebp
- pop ebp
- ret
- section "data" writeable align 8
- align 4
- _20:
- dd 0
- align 4
- _11:
- dd 0
- align 4
- _3:
- dd bbStringClass
- dd 2147483647
- dd 11
- dw 99,58,92,119,105,110,100,111,119,115,92
- align 4
- bb_files:
- dd bbEmptyArray
- align 4
- _7:
- dd bbStringClass
- dd 2147483647
- dd 2
- dw 32,32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement