joyce8/EMBER2024-capa huggingface dataset:
Function at 0x488fed
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x48908a
push ebx
push esi
call fcn.00488fb6
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.004851c5
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x489037
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x489089
push edi
push eax
call fcn.00483552
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x489057
call fcn.004818bc
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x489088
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004851c5
add esp, 0x20
test eax, eax
jne 0x489076
push edi
call fcn.004818bc
jmp 0x48907e
push ebx
call fcn.004818bc
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x48b09e
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0047ffba
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48b10d
cmp esi, dword [ebp - 4]
je 0x48b108
cmp dword [ebp + 0xc], 0
je 0x48b108
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x48b0e5
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0048abf0
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x48b10f
xor eax, eax
inc eax
jmp 0x48b10f
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x48b174
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4b9068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.0047ffba
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0047ffba
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x48b1eb
cmp word [ecx], dx
je 0x48b1eb
mov eax, dword [0x49be4c]
push edi
dec eax
push eax
push 0x49bd38
call fcn.0048b113
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x48b25e
cmp word [eax], dx
je 0x48b25e
mov eax, dword [edi]
test eax, eax
je 0x48b20f
cmp word [eax], dx
je 0x48b20f
lea eax, [ebp - 0x10]
push eax
call fcn.0048aaf6
jmp 0x48b218
lea eax, [ebp - 0x10]
push eax
call fcn.0048ab91
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x48b288
mov eax, dword [0x49bd34]
push dword [ebp - 0x14]
dec eax
push eax
push 0x49ba28
call fcn.0048b113
add esp, 0xc
test al, al
je 0x48b288
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x48b253
cmp word [eax], di
je 0x48b253
lea eax, [ebp - 0x10]
push eax
call fcn.0048aaf6
pop ecx
jmp 0x48b28a
lea eax, [ebp - 0x10]
push eax
call fcn.0048ab91
jmp 0x48b250
mov eax, dword [edi]
test eax, eax
je 0x48b275
cmp word [eax], dx
je 0x48b275
lea eax, [ebp - 0x10]
push eax
call fcn.0048aaab
pop ecx
jmp 0x48b288
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x48b353
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0048af98
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x48b353
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x48b353
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x48b353
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x48b2e0
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00481f84
test ebx, ebx
je 0x48b34e
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00481f84
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48b353
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48b353
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.004847c8
add esp, 0x10
xor eax, eax
inc eax
jmp 0x48b355
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046b159
leave
ret
Function at 0x48edc5
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0048ed41
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x48ef34
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x48ef34
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x48eee9
jg 0x48ee21
test eax, eax
je 0x48eedf
push 1
push 0x1000
call fcn.0048185f
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x48ee44
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x48eed6
push 0x8000
push ebx
call fcn.0047e106
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x48ee6d
jg 0x48ee68
cmp ecx, 0x1000
jb 0x48ee6d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00482d32
add esp, 0x10
cmp eax, 0xffffffff
je 0x48eeb2
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x48ee68
jl 0x48ee99
test ecx, ecx
jne 0x48ee5a
push dword [ebp - 0xc]
push ebx
call fcn.0047e106
push esi
call fcn.004818bc
add esp, 0xc
xor ebx, ebx
jmp 0x48ef42
cmp byte [edi + 0x24], 0
je 0x48eec9
cmp dword [edi + 0x20], 5
jne 0x48eec9
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x48eed4
mov ebx, dword [edi + 0x18]
jmp 0x48eed6
xor ebx, ebx
push esi
call fcn.004818bc
pop ecx
jmp 0x48ef42
test ecx, ecx
jg 0x48eeab
jl 0x48eee9
test eax, eax
jae 0x48eeab
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0047fc1e
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x48ef09
cmp byte [edi + 0x1c], 0
je 0x48eeab
jmp 0x48ef3a
push ebx
call fcn.004857dd
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x48eeab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x48ef42
cmp byte [edi + 0x1c], 0
je 0x48ef3f
mov ebx, dword [edi + 0x18]
jmp 0x48ef42
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0047fc1e
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x48f920
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
je 0x48fa5a
mov ecx, dword [ebp - 4]
lea ecx, [ecx*4 + 4]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x48fa5a
xor ebx, ebx
cmp dword [ebp - 4], ebx
jle 0x48f9fc
sub eax, esi
mov dword [ebp - 0xc], eax
mov edi, edi
push dword [esi]
call sub.SDL2.dll_SDL_wcslen
lea eax, [eax*2 + 2]
push eax
push dword [esi]
push str.UTF_16LE
push str.UTF_8
call sub.SDL2.dll_SDL_iconv_string
mov edi, eax
add esp, 0x14
test edi, edi
je 0x48fa5a
push edi
call sub.SDL2.dll_SDL_strlen
add esp, 4
mov dword [ebp - 0x10], eax
lea ecx, [eax + 1]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + esi], eax
test eax, eax
je 0x48fa5a
push dword [ebp - 0x10]
push edi
push eax
call fcn.0046c970
push edi
call sub.SDL2.dll_SDL_free
inc ebx
add esp, 0x10
add esi, 4
cmp ebx, dword [ebp - 4]
jl 0x48f980
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 8]
push esi
mov dword [edi + ebx*4], 0
call dword [sym.imp.KERNEL32.dll_LocalFree]
call sub.SDL2.dll_SDL_SetMainReady
push edi
push dword [ebp - 4]
call fcn.0044f1f0
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 4], esi
jle 0x48fa44
jmp 0x48fa30
push dword [edi + esi*4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
inc esi
cmp esi, dword [ebp - 4]
jl 0x48fa30
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0x4a2aa0
push str.Fatal_Error
push 0x10
call sub.SDL2.dll_SDL_ShowSimpleMessageBox
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x48fb90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x48fbbd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x48fbbd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401354
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
and dword [ebp - 0xc], 0
push ebx
xor eax, eax
and dword [ebp - 0x20], eax
push esi
push edi
lea edi, [ebp - 8]
stosd dword es:[edi], eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [0x4072bc]
test eax, eax
je 0x4013a6
push eax
call fcn.0040440d
cmp eax, 1
pop ecx
jb 0x4013a6
push dword [0x4072bc]
call fcn.0040440d
pop ecx
push 0x14
xor edx, edx
pop ecx
div ecx
mov ecx, dword [0x4072c0]
add ecx, 0x64
cmp ecx, eax
jb 0x4013ca
push dword [0x4072bc]
call fcn.0040440d
add eax, 0x4e20
push eax
push dword [0x4072bc]
call fcn.004043c4
add esp, 0xc
mov dword [0x4072bc], eax
mov byte [ebp - 1], 1
movzx esi, byte [ebp - 1]
push esi
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
xor ebx, ebx
mov bx, ax
shr ebx, 0xf
and bl, 1
cmp byte [esi + 0x4075e8], bl
jne 0x4013f7
inc byte [ebp - 1]
cmp byte [ebp - 1], 0xff
jb 0x4013ce
jmp 0x401401
movzx eax, byte [ebp - 1]
mov byte [eax + 0x4075e8], bl
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov al, byte [ebp - 1]
cmp al, 0xff
jae 0x401465
cmp al, 1
je 0x401442
cmp al, 2
je 0x40144e
cmp al, 0xa0
je 0x401465
neg bl
movzx esi, al
push 0
push esi
sbb ebx, ebx
add ebx, 0x101
mov dword [ebp - 0x20], ebx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov ebx, eax
mov edi, ebx
shl edi, 8
or edi, esi
jmp 0x40146b
neg bl
sbb ebx, ebx
add ebx, 0x202
jmp 0x401458
neg bl
sbb ebx, ebx
add ebx, 0x205
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 8]
mov edi, eax
jmp 0x40146e
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x20], 0
jne 0x4014a6
test eax, eax
je 0x401516
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x401516
lea ecx, [ebx + eax]
cmp cl, byte [0x4075e8]
je 0x401516
mov edi, eax
add al, bl
mov dword [ebp - 0x20], 0x200
mov byte [0x4075e8], al
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ecx, dword [0x4072c0]
mov edx, dword [0x4072bc]
lea ecx, [ecx + ecx*4]
mov dword [edx + ecx*4 + 0x10], eax
mov eax, dword [0x4072c0]
mov ecx, dword [0x4072bc]
mov edx, dword [ebp - 0x20]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4], edx
mov eax, dword [0x4072c0]
mov ecx, dword [0x4072bc]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4 + 4], edi
mov eax, dword [0x4072c0]
mov ecx, dword [0x4072bc]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4 + 8], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x4072c0]
mov edx, dword [0x4072bc]
lea ecx, [ecx + ecx*4]
mov dword [edx + ecx*4 + 0xc], eax
inc dword [0x4072c0]
push 0
push 0xa
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetTimer]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x401996
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
xor eax, eax
push ebx
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x3f
xor eax, eax
cmp dword [ebp + 8], ebx
mov byte [ebp - 0x11c], bl
pop ecx
lea edi, [ebp - 0x11b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x401b6a
cmp dword [ebp + 0xc], ebx
je 0x401b6a
push esi
push 0x4074e0
push 0xff
lea eax, [ebp - 0x11c]
push eax
push 0x405392
push str.toolbar_image
mov edi, 0x405318
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp byte [ebp - 0x11c], bl
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
je 0x401aa5
push 0x2050
push ebx
push ebx
push ebx
lea eax, [ebp - 0x11c]
push eax
push ebx
mov byte [0x4075e6], 1
call dword [sym.imp.USER32.dll_LoadImageA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x401a5f
lea ecx, [ebp - 0x1c]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
cmp dword [ebp - 0x14], 0xa
jl 0x401a5f
mov eax, dword [ebp - 0x18]
push 7
cdq
pop ecx
idiv ecx
cmp eax, 0xa
jl 0x401a5f
push ebx
call esi
cmp dword [ebp - 0x18], eax
jle 0x401aa0
mov eax, dword [0x4072cc]
or eax, 0x12030
push eax
lea eax, [ebp - 0x11c]
push eax
push str.Invalid_toolbar_BMP__too_small_or_big__n_nReverting_to_stock_toolbar
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x4074e0
push ebx
push str.toolbar_image
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [ebp - 4], ebx
je 0x401aa5
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], ebx
jne 0x401ac5
push ebx
push ebx
push ebx
push ebx
push 0xfa2
push ebx
mov byte [0x4075e6], bl
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [ebp - 4], eax
mov eax, dword [0x4072b0]
cmp eax, ebx
je 0x401ad5
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 4]
mov dword [0x4072b0], eax
mov eax, dword [0x4072b8]
cmp eax, ebx
je 0x401aed
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
push dword [0x4072b0]
call fcn.004018a9
pop ecx
pop ecx
mov dword [0x4072b8], eax
lea eax, [ebp - 0x1c]
push eax
push 0x18
push dword [0x4072b0]
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [ebp - 0x18]
push 7
cdq
pop ecx
idiv ecx
push ecx
mov dword [0x407014], eax
mov eax, dword [ebp - 0x14]
mov dword [0x407018], eax
call esi
mov edi, eax
movzx eax, byte [0x407044]
push 4
add edi, eax
call esi
add eax, dword [0x407018]
mov ecx, dword [ebp + 0xc]
lea eax, [eax + edi*2]
mov dword [ecx], eax
movzx edi, byte [0x407044]
push 7
call esi
mov ecx, eax
mov eax, dword [0x407014]
add eax, edi
lea eax, [eax + eax*2]
add ecx, eax
lea eax, [edi + ecx*2]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
pop esi
pop edi
pop ebx
leave
ret
Function at 0x403b8b
Capabilities:
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x403bc7
cmp dword [esp + 0xc], 0
je 0x403bc7
push 0x25
push esi
call fcn.0040435e
test eax, eax
pop ecx
pop ecx
je 0x403bbb
push 0x103
push dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
pop esi
ret
push esi
push dword [esp + 0x10]
call fcn.00404235
pop ecx
pop ecx
pop esi
ret

Function at 0x403c1f
Capabilities:
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x4f
xor ebx, ebx
pop ecx
xor eax, eax
cmp esi, ebx
lea edi, [ebp - 0x240]
mov dword [ebp - 0x244], ebx
rep stosd dword es:[edi], eax
push 0x40
mov byte [ebp - 0x104], bl
pop ecx
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x403d80
cmp byte [esi], bl
je 0x403d80
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.00403b8b
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
inc eax
test al, 0x10
jne 0x403cdd
lea eax, [ebp - 0x104]
push 0x2a
push eax
call fcn.0040435e
test eax, eax
pop ecx
pop ecx
jne 0x403ce5
lea eax, [ebp - 0x104]
push 0x3f
push eax
call fcn.0040435e
test eax, eax
pop ecx
pop ecx
jne 0x403ce5
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x403d80
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x403d82
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp byte [esi], bl
mov edi, eax
je 0x403d0b
push esi
call fcn.00404218
movsx ebx, byte [eax + esi - 1]
pop ecx
cmp ebx, 0x5c
jne 0x403d1e
cmp edi, 0xffffffff
je 0x403d80
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x403cdd
or ebx, 0xffffffff
cmp edi, ebx
je 0x403d80
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x218]
push 0x4059f8
push eax
call fcn.004042c7
test eax, eax
pop ecx
pop ecx
je 0x403d59
lea eax, [ebp - 0x218]
push 0x4059f4
push eax
call fcn.004042c7
test eax, eax
pop ecx
pop ecx
jne 0x403d74
lea eax, [ebp - 0x244]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x403d70
push edi
call esi
mov edi, ebx
cmp edi, ebx
jne 0x403d2b
cmp edi, ebx
je 0x403d80
push edi
call esi
jmp 0x403cdd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403d87
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
xor ebx, ebx
push 0x40
xor eax, eax
pop ecx
mov byte [ebp - 0x12c], bl
lea edi, [ebp - 0x12b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 8
xor eax, eax
pop ecx
lea edi, [ebp - 0x24]
mov dword [ebp - 0x28], ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x403dd7
cmp byte [eax], bl
je 0x403dd7
lea ecx, [ebp - 0x12c]
push ecx
push eax
call fcn.00403b8b
pop ecx
pop ecx
jmp 0x403df1
push 0x103
lea eax, [ebp - 0x12c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x28]
push eax
push ebx
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
je 0x403e11
cmp dword [ebp - 0xc], ebx
jne 0x403e5b
mov edi, dword [ebp - 8]
jmp 0x403e60
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x403e39
xor eax, eax
jmp 0x403e62
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
jne 0x403e56
xor edi, edi
jmp 0x403e60
cmp dword [ebp - 4], ebx
je 0x403e60
mov edi, 0x7ffffffe
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403e67
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
push 0x40
mov byte [ebp - 0x110], bl
pop ecx
lea edi, [ebp - 0x10f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
xor esi, esi
cmp eax, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
je 0x403faf
cmp byte [eax], bl
je 0x403faf
lea ecx, [ebp - 0x110]
push ecx
push eax
call fcn.00403b8b
pop ecx
pop ecx
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp + 8], edi
je 0x403fa2
cmp edi, ebx
je 0x403fa2
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
or ecx, eax
je 0x403f05
mov ecx, eax
sar ecx, 0x1f
cmp dword [ebp + 0x1c], ebx
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x1c]
jne 0x403f08
mov eax, dword [ebp + 0xc]
push ebx
lea ecx, [ebp - 8]
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x403f20
push edi
jmp 0x403fa9
cmp dword [ebp + 0x14], ebx
je 0x403f2a
mov edi, dword [ebp + 0x14]
jmp 0x403f37
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, ebx
je 0x403fa6
cmp dword [ebp - 0xc], ebx
jne 0x403fa6
mov esi, dword [ebp + 0x10]
cmp esi, ebx
jne 0x403f5d
lea eax, [edi + 0x100]
push 1
push eax
call fcn.004043aa
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x403fa6
push ebx
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [ebp + 8]
mov byte [esi], bl
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403f7f
mov eax, dword [ebp - 4]
cmp edi, eax
jne 0x403f7f
mov byte [esi + eax], bl
jmp 0x403f8d
cmp dword [ebp + 0x10], ebx
jne 0x403f8b
push esi
call fcn.004043f2
pop ecx
xor esi, esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x403fa2
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
mov eax, esi
jmp 0x403fb1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40460b
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov al, byte [esi]
cmp al, 0x22
je 0x404630
cmp al, 0x20
jle 0x404642
inc esi
cmp byte [esi], 0x20
jg 0x404624
jmp 0x404642
cmp al, 0x22
je 0x404641
inc esi
mov al, byte [esi]
test al, al
jne 0x40462c
cmp al, 0x22
jne 0x404642
jmp 0x404641
cmp al, 0x20
jg 0x404648
inc esi
mov al, byte [esi]
test al, al
jne 0x40463d
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004046b6
push 0x407004
push section..data
call fcn.0040469c
test byte [ebp - 0x18], 1
pop ecx
pop ecx
je 0x404678
movzx eax, word [ebp - 0x14]
jmp 0x40467b
push 0xa
pop eax
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov esi, eax
call fcn.004046ce
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]