joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49e310
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4c26dc]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov word [ebp - 0x20], ax
xor ecx, ecx
mov word [ebp - 0x1e], cx
cmp dword [ebp + 8], 0xffffffff
jne 0x49e334
jmp 0x49e3a3
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x49e348
jmp 0x49e3a3
movsx ecx, word [ebp - 0x1c]
movsx edx, word [ebp - 0x1a]
imul ecx, edx
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x24]
push edx
push 0x20
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
test eax, eax
jne 0x49e374
jmp 0x49e3a3
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x24]
push eax
movzx ecx, word [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
test eax, eax
jne 0x49e395
jmp 0x49e3a3
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4a9a
mov esp, ebp
pop ebp
ret
Function at 0x4b1de1
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4c26dc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.004a9396
mov dword [ebp - 0x14], eax
cmp dword [0x46fac68], esi
jne 0x4b1ed4
push 0x800
push esi
push 0xab82e4
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4b1e61
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4b1fb4
push esi
push esi
push 0xab82e4
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4b1fb4
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4b1fb4
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x46fac68], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x46fac6c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x46fac70], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x46fac78], eax
test eax, eax
je 0x4b1ed1
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x46fac74], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4b1ef9
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4b1eec
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x4b1f0e
push 4
pop eax
jmp 0x4b1fb6
cmp dword [ebp - 0x14], esi
je 0x4b1f0e
push dword [0x46fac68]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4b1ef3
mov eax, dword [0x46fac74]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x4b1f6c
cmp dword [0x46fac78], edi
je 0x4b1f6c
push eax
call ebx
push dword [0x46fac78]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x4b1f6c
test eax, eax
je 0x4b1f6c
call ecx
test eax, eax
je 0x4b1f61
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x4b1f61
test byte [ebp - 8], 1
jne 0x4b1f6c
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x4b1f9c
mov eax, dword [0x46fac6c]
cmp eax, edi
je 0x4b1f99
push eax
call ebx
test eax, eax
je 0x4b1f99
call eax
mov esi, eax
test esi, esi
je 0x4b1f99
mov eax, dword [0x46fac70]
cmp eax, edi
je 0x4b1f99
push eax
call ebx
test eax, eax
je 0x4b1f99
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x46fac68]
call ebx
test eax, eax
je 0x4b1fb4
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x4b1fb6
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4a9a
mov esp, ebp
pop ebp
ret
Function at 0x401050
Capabilities:
Create thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov ax, word [0x402130]
movups xmm0, xmmword [str.ConsoleWindowClass]
mov word [ebp - 0x20], ax
mov al, byte [0x402132]
movups xmmword [ebp - 0x30], xmm0
mov byte [ebp - 0x1e], al
movups xmm0, xmmword [str.I:dreamA01DebugCallFunction.exe]
mov eax, dword [0x402154]
push esi
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x60]
push edi
movups xmmword [ebp - 0x60], xmm0
push eax
movups xmm0, xmmword [0x402144]
lea eax, [ebp - 0x30]
push eax
movups xmmword [ebp - 0x50], xmm0
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, eax
push esi
push 0x402158
call fcn.00401010
add esp, 8
lea eax, [ebp - 0x64]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push dword [ebp - 0x64]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0x20
push 0x1000
push 0x1000
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
push esi
push 0x40216c
call fcn.00401010
add esp, 8
push 0
push 0x300
push 0x401040
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor ecx, ecx
test eax, eax
setne cl
push ecx
push 0x402180
call fcn.00401010
add esp, 8
push 0
push 0
push 0
push esi
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.00401166
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret

Function at 0x401965
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4019a4
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4019a4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4019a4
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4019a4
cmp dword [ecx + 0x74], 0xe
jbe 0x4019a4
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x401b54
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x14], 8
lea eax, [ebp - 4]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
mov dword [esp + 4], str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov dword [esp], 0x80000002
call sym._RegOpenKeyExA_20
sub esp, 0x14
test eax, eax
je 0x401baa
mov dword [esp], str.Error:__Regedit_cannot__be_opened_
call sym._printf
fld qword [0x4130b0]
fstp qword [ebp - 0x20]
jmp 0x401c15
lea eax, [ebp - 0x14]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.CurrentVersion
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._RegQueryValueExA_24
sub esp, 0x18
test eax, eax
jne 0x401c00
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
lea eax, [ebp - 0x10]
mov dword [esp], eax
call sym._atof
fstp qword [ebp - 0x20]
jmp 0x401c15
mov dword [esp], str.failed_
call sym._printf
fld qword [0x4130b0]
fstp qword [ebp - 0x20]
fld qword [ebp - 0x20]
leave
ret
Function at 0x40250a
Capabilities:
Create process on windows
Execute command
Self delete

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x648
mov dword [ebp - 0x18], str._ud_
mov dword [ebp - 0x14], 0x4130b8
mov dword [ebp - 0x10], 0x4130b8
mov dword [ebp - 0xc], 0x4130b8
mov dword [ebp - 0x61c], 0
cmp dword [ebp - 0x61c], 1
jg 0x402569
mov ecx, dword [ebp - 0x61c]
mov eax, dword [ebp - 0x61c]
lea edx, [eax*4]
mov eax, dword [ebp + 0xc]
mov eax, dword [edx + eax]
mov dword [ebp + ecx*4 - 0x14], eax
lea eax, [ebp - 0x61c]
inc dword [eax]
jmp 0x402539
cmp dword [ebp + 8], 2
jle 0x40259a
mov eax, dword [ebp + 0xc]
add eax, 8
mov eax, dword [eax]
mov dword [esp + 8], eax
mov dword [esp + 4], str._sUdLoadTemp__nx
lea eax, [ebp - 0x618]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x618]
mov dword [ebp - 0xc], eax
mov dword [esp + 8], 0x4130dc
mov dword [esp + 4], 0x4130de
mov eax, dword [ebp + 0xc]
add eax, 8
mov eax, dword [eax]
mov dword [esp], eax
call sym._StrReplace
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x6e
mov dword [esp + 4], 0x2f
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp], eax
call sym._path_split
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
add eax, 8
mov eax, dword [eax]
mov dword [esp + 8], eax
mov dword [esp + 4], str._sUdLoadTemp_s
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 4], 0
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._access
test eax, eax
jne 0x40266a
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x418]
mov dword [esp + 8], eax
mov dword [esp + 4], str.open
mov dword [esp], 0
call sym._ShellExecuteA_24
sub esp, 0x18
mov dword [ebp - 0x620], 0
jmp 0x40273e
mov eax, dword [ebp + 0xc]
add eax, 8
mov eax, dword [eax]
mov dword [esp + 8], eax
mov dword [esp + 4], str.del__Q__F___sUdLoadTemp.___nul
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._system
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x6e
mov dword [esp + 4], 0x2f
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp], eax
call sym._path_split
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
add eax, 8
mov eax, dword [eax]
mov dword [esp + 8], eax
mov dword [esp + 4], str.__sUdLoadTemp_s_
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x18]
mov dword [esp + 4], eax
mov dword [esp], 4
call sym._find_file_out
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x418]
mov dword [esp + 8], eax
mov dword [esp + 4], str.open
mov dword [esp], 0
call sym._ShellExecuteA_24
sub esp, 0x18
mov dword [ebp - 0x620], 0
mov eax, dword [ebp - 0x620]
leave
ret
Function at 0x4052de
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0x417364
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._read
cmp eax, 0x200
je 0x405312
mov dword [esp], str.file_read_fails
call sym._quit
cmp dword [0x417364], 0x52414246
je 0x40532a
mov dword [esp], str.invalid_archive_file
call sym._quit
mov dword [ebp - 8], 0x417364
mov eax, dword [0x4116cc]
add eax, 0x200
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
movzx eax, byte [eax + 4]
cmp al, byte [edx + 4]
jne 0x40535e
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
movzx eax, byte [eax + 5]
cmp al, byte [edx + 5]
jne 0x40535e
jmp 0x40536a
mov dword [esp], str.version_number_not_match
call sym._quit
mov eax, dword [ebp - 8]
movzx eax, word [eax + 8]
shl eax, 9
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._xmalloc
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp - 4]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._read
cmp eax, dword [ebp - 0x10]
je 0x4053af
mov dword [esp], str.file_read_fails
call sym._quit
mov eax, dword [ebp - 8]
movzx eax, word [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._remove_mark
mov eax, dword [ebp - 4]
leave
ret
Function at 0x406792
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
cmp dword [0x416b44], 0
je 0x4067ac
call sym._get_ar_size
mov dword [ebp - 0x10], eax
jmp 0x4067b3
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [0x41f5c4]
mov dword [esp + 0xc], eax
mov eax, dword [0x416b24]
mov dword [esp + 8], eax
mov eax, dword [0x416b54]
mov dword [esp + 4], eax
mov eax, dword [0x41f5d4]
mov dword [esp], eax
call sym._add_mark
mov eax, dword [0x41f364]
inc eax
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._seek_disk
mov dword [esp + 8], 1
mov dword [esp + 4], 0x417364
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._read_disk
mov dword [ebp - 8], 0x417364
mov ebx, dword [ebp - 8]
mov ecx, dword [0x41f5c4]
mov eax, 0x80808081
imul ecx
lea eax, [edx + ecx]
mov edx, eax
sar edx, 8
mov eax, ecx
sar eax, 0x1f
sub edx, eax
mov eax, edx
inc eax
mov word [ebx + 6], ax
mov eax, dword [0x41f364]
inc eax
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._seek_disk
mov dword [esp + 8], 1
mov dword [esp + 4], 0x417364
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._write_disk
mov eax, dword [0x416b24]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._seek_disk
mov eax, dword [0x416b54]
mov dword [esp + 8], eax
mov eax, dword [0x41f5d4]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._write_disk
cmp dword [0x416b44], 0
je 0x4068ee
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x416b34]
jge 0x4068ee
mov eax, dword [ebp + 8]
mov eax, dword [eax]
and eax, 1
test eax, eax
je 0x4068ee
mov eax, dword [ebp + 8]
mov eax, dword [eax]
and eax, 2
test eax, eax
jne 0x4068ee
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._seek_disk
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._SetEndOfFile_4
sub esp, 4
mov ebx, dword [ebp - 4]
leave
ret
Function at 0x4084a4
Capabilities:
Execute command
Query environment variable
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c8
mov dword [ebp - 0x19c], esp
mov dword [ebp - 0x10], 0x588
mov eax, dword [ebp - 0x10]
add eax, 0xf
add eax, 0xf
shr eax, 4
shl eax, 4
mov dword [ebp - 0x1ac], eax
mov eax, dword [ebp - 0x1ac]
call fcn.0040f760
lea eax, [esp + 0x10]
add eax, 0xf
shr eax, 4
shl eax, 4
mov dword [ebp - 0x1a0], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], str.setlocal_EnableDelayedExpansion_r_nfbinst__ud__filesize__PETOOLS___r_nset__a_size_errorlevel_105_100_r_nfor___i_in__Z_W_V_U_T_R_Q_P__do_if_not_exist___i:_nul___r_n_tset_udtooldrv__i:_r_n__r_nimdisk__a__s__size_K__m__udtooldrv___p_____FS:FAT__Y__Q__r_nfbinst__ud__output__PETOOLS____udtooldrv___r_n_r_n::__________
mov eax, dword [ebp - 0x1a0]
mov dword [esp], eax
call sym._memcpy
mov dword [esp], str.TEMP
call sym._getenv
mov dword [esp + 8], eax
mov dword [esp + 4], str._sAutoLoadPETOOLS.BAT
lea eax, [ebp - 0x98]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x98]
mov dword [esp + 8], eax
mov dword [esp + 4], str.start__s
lea eax, [ebp - 0x198]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 4], 0x414930
lea eax, [ebp - 0x98]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x408593
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1a0]
mov dword [esp], eax
call sym._fwrite
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._fclose
lea eax, [ebp - 0x198]
mov dword [esp], eax
call sym._system
mov esp, dword [ebp - 0x19c]
leave
ret

Function at 0x4085b4
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [str.PQRSTUVWZ]
mov dword [ebp - 0x18], eax
mov eax, dword [0x414938]
mov dword [ebp - 0x14], eax
movzx eax, word [0x41493c]
mov word [ebp - 0x10], ax
mov eax, dword [0x41493e]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0x20], 9
jg 0x40863b
lea eax, [ebp - 8]
add eax, dword [ebp - 0x20]
sub eax, 0x10
movzx eax, byte [eax]
mov byte [ebp - 0x1c], al
mov byte [ebp - 0x1b], 0x3a
mov byte [ebp - 0x1a], 0
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call sym._GetDriveTypeA_4
sub esp, 4
cmp eax, 1
jne 0x408634
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], 0x41352c
call sym._printf
mov byte [ebp - 0x1b], 0
movsx eax, byte [ebp - 0x1c]
mov dword [ebp - 0x24], eax
jmp 0x408642
lea eax, [ebp - 0x20]
inc dword [eax]
jmp 0x4085e4
mov dword [ebp - 0x24], 0xffffffff
mov eax, dword [ebp - 0x24]
leave
ret
Function at 0x408d52
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 2]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._seek_disk
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 6]
mov dword [ebp - 8], eax
cmp dword [ebp + 0x14], 0
jle 0x408d8d
mov eax, dword [ebp - 8]
mov dword [esp], eax
call sym._dot_init
mov eax, dword [ebp - 4]
cmp eax, dword [0x41f5e4]
jb 0x408da1
mov dword [ebp - 0x24], 0x200
jmp 0x408da8
mov dword [ebp - 0x24], 0x1fe
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], 0
je 0x408f0e
mov eax, dword [ebp - 0xc]
shl eax, 6
mov edx, dword [ebp - 8]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x28], ecx
jbe 0x408dd5
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
lea edx, [eax - 1]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x34], ecx
mov eax, edx
mov ecx, dword [ebp - 0x34]
mov edx, 0
div dword [ecx]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], 0x417364
cmp dword [ebp - 0xc], 0x200
jne 0x408e43
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x417364
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._read
cmp eax, dword [ebp - 0x10]
je 0x408ed6
mov dword [esp], str.file_read_fails
call sym._quit
jmp 0x408ed6
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x14]
jae 0x408ed6
mov eax, dword [ebp - 0x14]
dec eax
cmp eax, dword [ebp - 0x18]
jne 0x408e76
mov edx, dword [ebp - 0x18]
mov eax, edx
shl eax, 8
sub eax, edx
lea edx, [eax + eax]
mov eax, dword [ebp - 0x10]
sub eax, edx
mov dword [ebp - 0x30], eax
jmp 0x408e7d
mov dword [ebp - 0x30], 0x1fe
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
shl eax, 9
add eax, 0x417364
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._read
cmp eax, dword [ebp - 0x20]
je 0x408eb5
mov dword [esp], str.file_read_fails
call sym._quit
mov eax, dword [ebp - 0x18]
mov edx, eax
shl edx, 9
mov eax, dword [ebp - 4]
mov word [edx + 0x417562], ax
lea eax, [ebp - 0x18]
inc dword [eax]
lea eax, [ebp - 4]
inc dword [eax]
jmp 0x408e4a
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x417364
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._write_disk
cmp dword [ebp + 0x14], 0
je 0x408f01
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._dot_print
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 8]
sub dword [eax], edx
jmp 0x408dae
cmp dword [ebp + 0x14], 0
jle 0x408f19
call sym._dot_fini
leave
ret
Function at 0x408f1b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov eax, dword [eax + 0x10]
mov dword [ebp - 8], eax
mov dword [esp + 4], 0x8000
mov eax, dword [ebp - 8]
mov dword [esp], eax
call sym._setmode
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0x417364
mov eax, dword [ebp - 8]
mov dword [esp], eax
call sym._read
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jns 0x408f7d
mov dword [esp], str.read_stdin_fails
call sym._quit
cmp dword [ebp - 0x10], 0
jne 0x408f85
jmp 0x408fc9
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0xc]
add eax, 0x200
mov dword [esp + 4], eax
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._xrealloc
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x417364
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 4]
mov dword [esp], eax
call sym._memcpy
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0xc]
add dword [eax], edx
jmp 0x408f4d
mov eax, dword [ebp - 8]
mov dword [esp], eax
call sym._close
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
mov dword [edx], eax
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 4]
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp - 4]
leave
ret

Function at 0x4092c9
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp byte [eax], 0x2f
jne 0x4092e2
lea eax, [ebp - 4]
inc dword [eax]
mov eax, dword [ebp - 4]
cmp byte [eax], 0
je 0x409326
mov eax, dword [ebp - 4]
cmp byte [eax], 0x2f
je 0x4092fc
mov eax, dword [ebp - 4]
cmp byte [eax], 0x5c
je 0x4092fc
jmp 0x40931f
mov eax, dword [ebp - 4]
movzx eax, byte [eax]
mov byte [ebp - 5], al
mov eax, dword [ebp - 4]
mov byte [eax], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._mkdir
mov edx, dword [ebp - 4]
movzx eax, byte [ebp - 5]
mov byte [edx], al
lea eax, [ebp - 4]
inc dword [eax]
jmp 0x4092e2
leave
ret
Function at 0x40b7fd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [esp + 4], 0x414d37
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40b847
mov dword [esp], str.Failed_to_open_file..._n
call sym._printf
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._fclose
mov dword [ebp - 0x10], 0xffffffff
jmp 0x40b916
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._getw
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._getc
mov byte [ebp - 5], al
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._getc
mov byte [ebp - 6], al
mov byte [ebp - 7], 1
cmp dword [ebp - 0xc], 0x52414246
jne 0x40b8a7
cmp byte [ebp - 5], 1
jne 0x40b8a7
cmp byte [ebp - 6], 6
jne 0x40b8a7
jmp 0x40b8c7
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._fclose
mov dword [esp], str.Source_file_is_not_a_valid_fba_Version_1.6__file..._n
call sym._printf
mov dword [ebp - 0x10], 0xffffffff
jmp 0x40b916
mov dword [esp + 8], 0
mov dword [esp + 4], 0x10
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp - 4]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 7]
mov dword [esp], eax
call sym._fwrite
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sym._fclose
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
leave
ret