joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4015f0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
mov eax, dword [0x41399c]
push esi
push edi
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov dword [eax + 4], esi
mov eax, dword [0x41399c]
mov dword [eax + 8], edi
cmp dword [0x413940], 0
je 0x401846
cmp dword [0x4139b4], 0
je 0x40167b
inc word [0x413984]
test byte [0x413984], 3
jne 0x40167b
cmp dword [0x413970], 0
je 0x401656
push 0
push 0
push 4
call fcn.004035a0
add esp, 0xc
dec dword [0x413970]
inc dword [0x413990]
jmp 0x40167b
cmp word [0x41397c], 0
je 0x40166c
mov dword [0x413940], 0
jmp 0x40167b
call fcn.00402810
mov dword [0x4139b4], 0
cmp dword [0x413948], 0
je 0x401782
cmp dword [0x413980], 0
je 0x40169c
dec dword [0x413980]
jmp 0x40171c
xor eax, eax
mov dword [0x413948], eax
cmp dword [0x413978], eax
je 0x4016c2
cmp word [0x41397c], ax
je 0x4016bb
mov dword [0x413940], eax
jmp 0x40171c
call fcn.004028c0
jmp 0x40171c
mov ecx, 3
sub edx, edx
inc dword [0x413938]
mov eax, dword [0x413938]
div ecx
test edx, edx
je 0x40170b
mov eax, dword [0x413920]
cmp dword [0x413990], eax
jb 0x4016ff
push 7
push 5
push 0x4120f0
call fcn.004010a0
add esp, 0xc
call fcn.00402810
jmp 0x40171c
mov dword [0x413940], 0
jmp 0x40171c
push 4
push 5
push 0x4120f0
call fcn.004010a0
add esp, 0xc
cmp dword [0x413978], 0
jne 0x401782
inc word [0x413924]
test byte [0x413924], 0x3f
jne 0x401782
push 0x19
push 0x40f350
call fcn.00404048
add esp, 8
test eax, eax
jne 0x401782
push 0x40
call fcn.00405256
mov bx, ax
add esp, 4
cmp bx, 6
jae 0x401782
cmp word [0x413968], bx
je 0x401782
movzx eax, bx
push 0
push 0
mov ecx, dword [eax*4 + 0x40f3c8]
push ecx
call fcn.004035a0
mov word [0x413968], bx
add esp, 0xc
mov edx, dword [esp + 0x18]
test edx, edx
je 0x40182f
cmp esi, 0x7f00
je 0x40182f
cmp edi, 0x7f00
je 0x40182f
cmp word [0x41393c], 0
jne 0x401838
xor ecx, ecx
mov eax, 0x40f214
cmp dword [eax], edi
jg 0x4017ce
cmp dword [eax + 8], edi
jl 0x4017ce
cmp dword [eax - 4], esi
jg 0x4017ce
cmp dword [eax + 4], esi
jge 0x4017e7
add eax, 0x10
inc ecx
cmp eax, 0x40f2a4
jb 0x4017bb
call fcn.00402950
mov eax, 1
pop edi
pop esi
pop ebx
ret
mov eax, dword [0x413998]
add eax, ecx
mov ecx, dword [0x41399c]
shl eax, 4
lea ebx, [eax + eax*2]
lea eax, [ebx + ecx + 0x20]
cmp dword [eax], 0
jne 0x401838
mov dword [eax], edx
mov eax, dword [0x41399c]
mov ecx, dword [0x41392c]
shl ecx, 4
lea edx, [ecx + ecx*2]
inc dword [edx + eax + 0x20]
inc word [0x41393c]
call fcn.00402950
mov eax, 1
pop edi
pop esi
pop ebx
ret
mov word [0x41393c], 0
call fcn.00402950
mov eax, 1
pop edi
pop esi
pop ebx
ret
mov dword [0x414f3c], 2
call fcn.00401260
call fcn.004014f0
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov eax, 1
pop edi
mov dword [0x414f74], 0
pop esi
pop ebx
ret
Function at 0x401880
Capabilities:
Log keystrokes via polling

Disassembly:
test byte [esp + 0xc], 0xc
push ebx
push esi
push edi
push ebp
je 0x4018c2
mov dword [0x414f3c], 1
call fcn.00401260
call fcn.004014f0
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
inc word [0x41393c]
mov eax, 1
mov dword [0x414f74], 0
pop ebp
pop edi
pop esi
pop ebx
ret
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
cmp ecx, 0x7f00
jne 0x4018da
cmp edx, 0x7f00
je 0x4018ea
mov eax, dword [0x41399c]
mov dword [eax + 4], ecx
mov eax, dword [0x41399c]
mov dword [eax + 8], edx
xor ecx, ecx
cmp dword [0x41398c], ecx
jbe 0x40195c
xor edx, edx
xor esi, esi
mov eax, dword [0x41399c]
add eax, edx
cmp dword [eax], 2
jne 0x401950
dec dword [eax + 0x1c]
mov eax, dword [0x41399c]
add eax, edx
cmp dword [eax + 0x1c], esi
jne 0x401950
inc dword [eax + 0x18]
mov edi, dword [0x41399c]
add edi, edx
mov eax, dword [edi + 0x14]
mov ebx, dword [edi + 0x18]
cmp dword [eax + 4], ebx
ja 0x401944
mov dword [edi + 0x18], esi
xor edi, edi
mov ebx, dword [0x41399c]
add ebx, edx
mov ebp, dword [ebx + 0x14]
mov eax, dword [ebp + 0xc]
mov di, word [eax]
mov dword [ebx + 0x1c], edi
jmp 0x401950
mov eax, dword [eax + 0xc]
xor ebp, ebp
mov bp, word [eax + ebx*2]
mov dword [edi + 0x1c], ebp
add edx, 0x30
inc ecx
cmp dword [0x41398c], ecx
ja 0x4018f8
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4049c1
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
lea eax, [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 8]
push eax
push 0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x404a02
mov eax, 1
jmp 0x404a13
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x404a13
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404a18
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
push 3
push 0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x404a57
mov eax, 1
jmp 0x404a68
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x404a68
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404dd0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov dword [ebp - 8], 0
push 2
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x404ea1
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0xc], eax
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
call fcn.00404c90
add esp, 8
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x404e63
push 0
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
push 0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x18]
shl eax, 2
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx]
add eax, dword [ebp - 0xc]
push eax
push 4
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x14]
push eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp - 8]
jmp 0x404ea9
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4054d9
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
cmp dword [0x4122f8], 0
je 0x40559c
mov dword [0x414f74], 0
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov dword [0x4122f8], 0
cmp dword [0x41230c], 0
je 0x405527
call fcn.00406f56
jmp 0x40559c
mov eax, dword [0x414fa0]
push eax
push 0xfffffffffffffff4
mov eax, dword [0x414f4c]
push eax
call dword [sym.imp.USER32.dll_SetClassLongA]
push 0
call dword [sym.imp.USER32.dll_SetCursor]
push 1
call fcn.00404305
add esp, 4
cmp dword [0x414fb0], 0
je 0x40559c
mov eax, dword [0x414f68]
imul eax, dword [0x414f6c]
push eax
push 0
mov eax, dword [0x414f64]
push eax
call fcn.0040a5c0
add esp, 0xc
call fcn.004069a8
push 0
mov eax, dword [0x414fb0]
push eax
mov eax, dword [0x414f48]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
mov eax, dword [0x414f48]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4055a1
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
call fcn.0040523a
add esp, 4
call dword [sym.imp.WINMM.dll_timeGetTime]
movzx eax, ax
push eax
call fcn.0040a620
add esp, 4
call fcn.00403590
mov dword [0x414fac], eax
call fcn.00405928
test eax, eax
je 0x4055f0
xor eax, eax
jmp 0x4057fc
mov eax, dword [ebp + 8]
mov dword [0x414f84], eax
call fcn.00403580
push eax
mov eax, dword [ebp + 0x10]
push eax
call fcn.004078c5
add esp, 8
test eax, eax
je 0x4057e3
push 8
mov eax, dword [0x414f4c]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x414f4c]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
cmp dword [0x412318], 0
jne 0x405650
push 0x412328
call fcn.00406bc7
add esp, 4
mov dword [0x412318], 1
mov dword [ebp - 8], 0
cmp dword [ebp - 8], 0
jne 0x4057de
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40571c
cmp dword [ebp - 0x24], 0x12
jne 0x405691
mov dword [ebp - 8], 1
jmp 0x4057de
cmp dword [ebp - 0x24], 0x112
jne 0x4056e3
cmp dword [ebp - 0x20], 0xf140
jne 0x4056e3
call fcn.004066c0
xor ecx, ecx
mov cl, al
test ecx, ecx
jne 0x4056c9
cmp dword [0x41230c], 0
je 0x4056d3
jmp 0x405657
call fcn.004053e1
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x4122f8], 0
jne 0x405703
call dword [sym.imp.USER32.dll_GetActiveWindow]
test eax, eax
jne 0x405703
call fcn.004053e1
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x4057d9
cmp dword [0x4122f8], 0
jne 0x405736
cmp dword [0x41230c], 0
je 0x405741
call dword [sym.imp.USER32.dll_WaitMessage]
jmp 0x4057d9
cmp dword [0x412318], 2
jne 0x4057d9
inc dword [0x412318]
call fcn.00401020
test eax, eax
je 0x4057cf
push 0
push 0x404eae
push 0x412334
call fcn.00405803
add esp, 0xc
push 1
push 0x405069
push 0x412340
call fcn.00405803
add esp, 0xc
cmp dword [0x4122f4], 0
je 0x4057ac
mov eax, dword [0x414f4c]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
call fcn.004066d5
call fcn.004054d9
call fcn.00402ed0
mov dword [ebp - 0xc], eax
call fcn.004066c0
xor ecx, ecx
mov cl, al
mov dword [0x4122f4], ecx
mov dword [ebp - 8], 1
jmp 0x4057d9
call fcn.004073a2
call fcn.0040718d
jmp 0x405657
call fcn.00407663
cmp dword [0x4122f4], 0
je 0x4057f4
or dword [ebp - 0xc], 2
mov eax, dword [ebp - 0xc]
jmp 0x4057fc
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x406973
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0
push 0x402
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x414df8
call dword [sym.imp.USER32.dll_ClipCursor]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4070d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 4], 0
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x407180
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x180000
ja 0x407165
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407160
mov eax, dword [ebp + 0xc]
push eax
call fcn.00408113
add esp, 4
test eax, eax
je 0x407160
mov dword [ebp - 4], 1
jmp 0x407176
mov eax, dword [ebp + 8]
push eax
push str.Module_to_Large__s
call fcn.004052e6
add esp, 8
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
jmp 0x407188
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4073a2
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
call fcn.00406943
mov eax, dword [0x414f80]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x407405
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [0x414f4c]
push eax
call dword [sym.imp.USER32.dll_GetWindowPlacement]
push 0
mov eax, dword [0x414f4c]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov dword [ebp - 0x2c], 0x2c
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 9
push 8
mov eax, dword [0x414f80]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x414f4c]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [0x414f80]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40743d
mov eax, dword [0x414f80]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x414f80]
push eax
call dword [sym.imp.USER32.dll_SetActiveWindow]
cmp dword [0x414f98], 0
je 0x407456
mov eax, dword [0x414f98]
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp dword [0x414f94], 0
je 0x40746f
mov eax, dword [0x414f94]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a180
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x40b534
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x412980], eax
xor eax, eax
mov al, byte [0x412981]
mov dword [0x41298c], eax
mov eax, dword [0x412980]
shr dword [0x412980], 0x10
and eax, 0xff
mov dword [0x412988], eax
shl eax, 8
add eax, dword [0x41298c]
mov dword [0x412984], eax
call fcn.0040b4f0
test eax, eax
jne 0x40a1f4
push 0x1c
call fcn.0040a320
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040b310
call fcn.0040b300
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4150d0], eax
call fcn.0040aeb0
mov dword [0x412958], eax
test eax, eax
je 0x40a227
cmp dword [0x4150d0], 0
jne 0x40a231
push 0xffffffffffffffff
call fcn.0040a750
add esp, 4
call fcn.0040ac30
call fcn.0040ab40
call fcn.0040a720
mov esi, dword [0x4150d0]
mov al, byte [esi]
cmp al, 0x22
je 0x40a258
cmp al, 0x20
jbe 0x40a285
inc esi
cmp byte [esi], 0x20
ja 0x40a250
jmp 0x40a285
inc esi
cmp byte [esi], 0x22
je 0x40a284
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x40a27f
xor eax, eax
mov al, bl
push eax
call fcn.0040aae0
add esp, 4
test eax, eax
je 0x40a279
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x40a261
cmp byte [esi], 0x22
jne 0x40a285
inc esi
cmp byte [esi], 0
je 0x40a295
cmp byte [esi], 0x20
ja 0x40a295
inc esi
cmp byte [esi], 0
jne 0x40a28a
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x40a2b9
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.0040a750
jmp 0x40a2fa
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40a790
Capabilities:
Terminate process

Disassembly:
cmp dword [0x4129bc], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40a7ae
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4129b8], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x4129b4], bl
jne 0x40a808
cmp dword [0x4150c8], 0
je 0x40a7f6
mov edi, dword [0x4150c4]
sub edi, 4
cmp edi, dword [0x4150c8]
jb 0x40a7f6
mov eax, dword [edi]
test eax, eax
je 0x40a7eb
call eax
sub edi, 4
cmp edi, dword [0x4150c8]
jae 0x40a7e3
push 0x40f014
push 0x40f010
call fcn.0040a840
add esp, 8
push 0x40f01c
push 0x40f018
call fcn.0040a840
add esp, 8
test ebx, ebx
jne 0x40a82f
mov dword [0x4129bc], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x40aeb0
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x412a60], ebx
jne 0x40aeff
call esi
cmp eax, ebx
mov edi, eax
je 0x40aedd
mov dword [0x412a60], 1
jmp 0x40aeff
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x40aef5
mov dword [0x412a60], 2
jmp 0x40aeff
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x412a60], 1
jne 0x40afae
test edi, edi
jne 0x40af22
call esi
mov edi, eax
test edi, edi
jne 0x40af22
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40af3c
add esi, 2
cmp word [esi], 0
jne 0x40af2a
add esi, 2
cmp word [esi], 0
jne 0x40af2a
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x40af9d
push ebp
call fcn.0040a3a0
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40af9d
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40af8c
push ebx
call fcn.0040a350
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x412a60], 2
jne 0x40b032
test ebx, ebx
jne 0x40afd1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x40afd1
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x40afe6
inc ebp
cmp byte [ebp], 0
jne 0x40afd8
inc ebp
cmp byte [ebp], 0
jne 0x40afd8
sub ebp, ebx
inc ebp
push ebp
call fcn.0040a3a0
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40b00b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x40b650
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x412c90
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x40b677
add eax, 8
inc ecx
cmp eax, 0x412d20
jb 0x40b668
cmp dword [ecx*8 + 0x412c90], edx
lea ebx, [ecx*8]
jne 0x40b83b
cmp dword [0x412964], 1
je 0x40b7f7
cmp dword [0x412964], 0
jne 0x40b6ae
cmp dword [0x412968], 1
je 0x40b7f7
cmp edx, 0xfc
je 0x40b83b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x40b6eb
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40b72f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x40e2e0
push ebp
call fcn.0040c160
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40e2c0
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x412c94]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.0040c0c0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x414fc0], 0
je 0x40b80d
mov eax, dword [0x414fc0]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40b817
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x412c94]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x40d090
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.0040d4b0
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp dword [0x4150c0], esi
jbe 0x40d1dd
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x414fc0]
test byte [edx + ecx*8 + 4], 1
je 0x40d1dd
push 1
push ebx
push esi
call fcn.0040c8d0
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x40d1cd
push 2
push ebx
push esi
call fcn.0040c8d0
add esp, 0xc
cmp eax, 0xffffffff
je 0x40d1cd
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x40d173
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.0040d200
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x40d136
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.0040d280
add esp, 0xc
cmp eax, 0xffffffff
je 0x40d152
sub ebp, eax
test ebp, ebp
jg 0x40d12b
jmp 0x40d167
cmp dword [0x412978], 5
jne 0x40d165
mov dword [0x412974], 0xd
mov ebx, eax
push edi
push esi
call fcn.0040d200
add esp, 8
jmp 0x40d1b0
jge 0x40d1b0
push 0
push ecx
push esi
call fcn.0040c8d0
add esp, 0xc
push esi
call fcn.0040d040
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x40d1b0
mov dword [0x412974], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x412978], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.0040c8d0
add esp, 0xc
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x412974], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret