joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4036f0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
mov bl, byte [esp + 0xc]
cmp bl, byte [0x410f84]
jne 0x40396a
cmp bl, 0xfe
je 0x403714
xor eax, eax
mov al, bl
push eax
call fcn.00404bdb
add esp, 4
mov eax, dword [0x41464c]
xor ecx, ecx
mov dword [eax + 0x348], ecx
mov eax, dword [0x41464c]
mov esi, dword [eax + 0x348]
mov dword [eax + 0x398], esi
mov eax, dword [0x41464c]
mov esi, dword [eax + 0x398]
mov dword [eax + 0x190], esi
mov byte [0x410f98], cl
mov byte [0x410f90], cl
mov eax, dword [0x41464c]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov byte [0x410f94], cl
mov byte [0x410f8c], cl
mov byte [0x410f84], 0xfe
mov dword [eax + 0x1b8], ecx
call esi
sub ax, word [0x410f74]
mov word [0x41460c], ax
cmp byte [0x4108f0], 2
je 0x403794
cmp byte [0x4108f0], 3
jne 0x4037f7
xor eax, eax
xor ecx, ecx
mov ax, word [0x41460c]
mov cx, word [0x410f70]
add eax, ecx
cmp eax, 0x3a98
jle 0x4037bb
mov ax, 0x3a98
sub ax, cx
mov word [0x41460c], ax
mov ax, word [0x41460c]
xor ecx, ecx
mov cx, word [0x410f64]
mov word [ecx + ecx*2 + 0x414655], ax
cmp cx, 0x800
jae 0x4037e0
inc word [0x410f64]
xor eax, eax
mov ax, word [0x410f64]
mov byte [eax + eax*2 + 0x414654], 0xfe
call esi
mov dword [0x410f74], eax
cmp bl, 0xfe
je 0x40396a
cmp byte [0x4108f0], 0
jne 0x40381a
mov dword [0x410f88], 1
call esi
mov dword [0x410f74], eax
xor eax, eax
mov al, byte [0x410f48]
test eax, eax
je 0x40383a
cmp eax, 1
je 0x4038cb
cmp eax, 2
je 0x40391a
pop esi
pop ebx
ret
mov eax, dword [0x41464c]
mov ecx, 3
mov edx, 0xffffffff
mov dword [eax + 0x400], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x404], edx
mov eax, dword [0x41464c]
mov dword [eax + 0x428], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x42c], edx
mov eax, dword [0x41464c]
mov dword [eax + 0x450], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x454], edx
mov eax, dword [0x41464c]
mov dword [eax + 0x4c8], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x4cc], edx
mov eax, dword [0x41464c]
mov dword [eax + 0x4f0], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x4f4], edx
mov eax, dword [0x41464c]
pop esi
pop ebx
mov dword [eax + 0x518], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x51c], edx
ret
mov eax, dword [0x41464c]
mov ecx, 3
mov edx, 0xffffffff
mov dword [eax + 0x4a0], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x4a4], edx
mov eax, dword [0x41464c]
mov dword [eax + 0x4f0], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x4f4], edx
mov eax, dword [0x41464c]
pop esi
pop ebx
mov dword [eax + 0x518], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x51c], edx
ret
mov eax, dword [0x41464c]
mov edx, 0xffffffff
mov dword [eax + 0x3d8], 2
mov eax, dword [0x41464c]
mov ecx, 3
mov dword [eax + 0x3dc], edx
mov eax, dword [0x41464c]
mov dword [eax + 0x428], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x42c], edx
mov eax, dword [0x41464c]
mov dword [eax + 0x450], ecx
mov eax, dword [0x41464c]
mov dword [eax + 0x454], edx
pop esi
pop ebx
ret
Function at 0x40576d
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 0x4057ae
mov eax, 1
jmp 0x4057bf
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4057bf
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4057c4
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 1
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 0x405803
mov eax, 1
jmp 0x405814
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x405814
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405ad0
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 0x405ba1
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.00405990
add esp, 8
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x405b63
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 0x405ba9
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4061d9
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
cmp dword [0x411688], 0
je 0x40629c
mov dword [0x417414], 0
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov dword [0x411688], 0
cmp dword [0x41169c], 0
je 0x406227
call fcn.00407c56
jmp 0x40629c
mov eax, dword [0x417440]
push eax
push 0xfffffffffffffff4
mov eax, dword [0x4173e4]
push eax
call dword [sym.imp.USER32.dll_SetClassLongA]
push 0
call dword [sym.imp.USER32.dll_SetCursor]
push 1
call fcn.00405005
add esp, 4
cmp dword [0x417450], 0
je 0x40629c
mov eax, dword [0x417408]
imul eax, dword [0x41740c]
push eax
push 0
mov eax, dword [0x417404]
push eax
call fcn.0040b460
add esp, 0xc
call fcn.004076a8
push 0
mov eax, dword [0x417450]
push eax
mov eax, dword [0x4173e0]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
mov eax, dword [0x4173e0]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4062a1
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.00405f3a
add esp, 4
call dword [sym.imp.WINMM.dll_timeGetTime]
movzx eax, ax
push eax
call fcn.0040ae80
add esp, 4
call fcn.004042b0
mov dword [0x41744c], eax
call fcn.00406628
test eax, eax
je 0x4062f0
xor eax, eax
jmp 0x4064fc
mov eax, dword [ebp + 8]
mov dword [0x417424], eax
call fcn.004042a0
push eax
mov eax, dword [ebp + 0x10]
push eax
call fcn.004085c5
add esp, 8
test eax, eax
je 0x4064e3
push 8
mov eax, dword [0x4173e4]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x4173e4]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
cmp dword [0x4116a8], 0
jne 0x406350
push 0x4116b8
call fcn.004078c7
add esp, 4
mov dword [0x4116a8], 1
mov dword [ebp - 8], 0
cmp dword [ebp - 8], 0
jne 0x4064de
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 0x40641c
cmp dword [ebp - 0x24], 0x12
jne 0x406391
mov dword [ebp - 8], 1
jmp 0x4064de
cmp dword [ebp - 0x24], 0x112
jne 0x4063e3
cmp dword [ebp - 0x20], 0xf140
jne 0x4063e3
call fcn.004073c0
xor ecx, ecx
mov cl, al
test ecx, ecx
jne 0x4063c9
cmp dword [0x41169c], 0
je 0x4063d3
jmp 0x406357
call fcn.004060e1
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x411688], 0
jne 0x406403
call dword [sym.imp.USER32.dll_GetActiveWindow]
test eax, eax
jne 0x406403
call fcn.004060e1
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 0x4064d9
cmp dword [0x411688], 0
jne 0x406436
cmp dword [0x41169c], 0
je 0x406441
call dword [sym.imp.USER32.dll_WaitMessage]
jmp 0x4064d9
cmp dword [0x4116a8], 2
jne 0x4064d9
inc dword [0x4116a8]
call fcn.00401030
test eax, eax
je 0x4064cf
push 0
push 0x405bae
push 0x4116c4
call fcn.00406503
add esp, 0xc
push 1
push 0x405d69
push 0x4116d0
call fcn.00406503
add esp, 0xc
cmp dword [0x411684], 0
je 0x4064ac
mov eax, dword [0x4173e4]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
call fcn.004073d5
call fcn.004061d9
call fcn.00403a90
mov dword [ebp - 0xc], eax
call fcn.004073c0
xor ecx, ecx
mov cl, al
mov dword [0x411684], ecx
mov dword [ebp - 8], 1
jmp 0x4064d9
call fcn.004080a2
call fcn.00407e8d
jmp 0x406357
call fcn.00408363
cmp dword [0x411684], 0
je 0x4064f4
or dword [ebp - 0xc], 2
mov eax, dword [ebp - 0xc]
jmp 0x4064fc
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x407673
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 0x417290
call dword [sym.imp.USER32.dll_ClipCursor]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407dd0
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 0x407e80
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 0x407e65
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 0x407e60
mov eax, dword [ebp + 0xc]
push eax
call fcn.00408e13
add esp, 4
test eax, eax
je 0x407e60
mov dword [ebp - 4], 1
jmp 0x407e76
mov eax, dword [ebp + 8]
push eax
push str.Module_to_Large__s
call fcn.00405fe6
add esp, 8
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
jmp 0x407e88
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4080a2
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
call fcn.00407643
mov eax, dword [0x417420]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x408105
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [0x4173e4]
push eax
call dword [sym.imp.USER32.dll_GetWindowPlacement]
push 0
mov eax, dword [0x4173e4]
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 [0x417420]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x4173e4]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [0x417420]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40813d
mov eax, dword [0x417420]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x417420]
push eax
call dword [sym.imp.USER32.dll_SetActiveWindow]
cmp dword [0x417438], 0
je 0x408156
mov eax, dword [0x417438]
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp dword [0x417434], 0
je 0x40816f
mov eax, dword [0x417434]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b020
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x40c424
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 [0x411d0c], eax
xor eax, eax
mov al, byte [0x411d0d]
mov dword [0x411d18], eax
mov eax, dword [0x411d0c]
shr dword [0x411d0c], 0x10
and eax, 0xff
mov dword [0x411d14], eax
shl eax, 8
add eax, dword [0x411d18]
mov dword [0x411d10], eax
call fcn.0040c3e0
test eax, eax
jne 0x40b094
push 0x1c
call fcn.0040b1c0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040c200
call fcn.0040ba10
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x417570], eax
call fcn.0040c070
mov dword [0x411cec], eax
test eax, eax
je 0x40b0c7
cmp dword [0x417570], 0
jne 0x40b0d1
push 0xffffffffffffffff
call fcn.0040b5b0
add esp, 4
call fcn.0040bdf0
call fcn.0040bd00
call fcn.0040b580
mov esi, dword [0x417570]
mov al, byte [esi]
cmp al, 0x22
je 0x40b0f8
cmp al, 0x20
jbe 0x40b125
inc esi
cmp byte [esi], 0x20
ja 0x40b0f0
jmp 0x40b125
inc esi
cmp byte [esi], 0x22
je 0x40b124
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x40b11f
xor eax, eax
mov al, bl
push eax
call fcn.0040bca0
add esp, 4
test eax, eax
je 0x40b119
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x40b101
cmp byte [esi], 0x22
jne 0x40b125
inc esi
cmp byte [esi], 0
je 0x40b135
cmp byte [esi], 0x20
ja 0x40b135
inc esi
cmp byte [esi], 0
jne 0x40b12a
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 0x40b159
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.0040b5b0
jmp 0x40b19a
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 0x40b5f0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x411d48], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40b60e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x411d44], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x411d40], bl
jne 0x40b668
cmp dword [0x417568], 0
je 0x40b656
mov edi, dword [0x417564]
sub edi, 4
cmp edi, dword [0x417568]
jb 0x40b656
mov eax, dword [edi]
test eax, eax
je 0x40b64b
call eax
sub edi, 4
cmp edi, dword [0x417568]
jae 0x40b643
push 0x410014
push 0x410010
call fcn.0040b6a0
add esp, 8
push 0x41001c
push 0x410018
call fcn.0040b6a0
add esp, 8
test ebx, ebx
jne 0x40b68f
mov dword [0x411d48], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x40c070
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 [0x412008], ebx
jne 0x40c0bf
call esi
cmp eax, ebx
mov edi, eax
je 0x40c09d
mov dword [0x412008], 1
jmp 0x40c0bf
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x40c0b5
mov dword [0x412008], 2
jmp 0x40c0bf
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x412008], 1
jne 0x40c16e
test edi, edi
jne 0x40c0e2
call esi
mov edi, eax
test edi, edi
jne 0x40c0e2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40c0fc
add esi, 2
cmp word [esi], 0
jne 0x40c0ea
add esi, 2
cmp word [esi], 0
jne 0x40c0ea
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 0x40c15d
push ebp
call fcn.0040b240
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40c15d
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 0x40c14c
push ebx
call fcn.0040b1f0
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 [0x412008], 2
jne 0x40c1f2
test ebx, ebx
jne 0x40c191
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x40c191
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x40c1a6
inc ebp
cmp byte [ebp], 0
jne 0x40c198
inc ebp
cmp byte [ebp], 0
jne 0x40c198
sub ebp, ebx
inc ebp
push ebp
call fcn.0040b240
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40c1cb
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 0x40c540
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x412020
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x40c567
add eax, 8
inc ecx
cmp eax, 0x4120b0
jb 0x40c558
cmp dword [ecx*8 + 0x412020], edx
lea ebx, [ecx*8]
jne 0x40c72b
cmp dword [0x411cf8], 1
je 0x40c6e7
cmp dword [0x411cf8], 0
jne 0x40c59e
cmp dword [0x411cfc], 1
je 0x40c6e7
cmp edx, 0xfc
je 0x40c72b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x40c5db
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 0x40c61f
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 0x40f2e0
push ebp
call fcn.0040cfb0
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, 0x40f2c0
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 + 0x412024]
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.0040d0b0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x417460], 0
je 0x40c6fd
mov eax, dword [0x417460]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40c707
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x412024]
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 0x40df80
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.0040e3a0
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp dword [0x417560], esi
jbe 0x40e0cd
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x417460]
test byte [edx + ecx*8 + 4], 1
je 0x40e0cd
push 1
push ebx
push esi
call fcn.0040d7c0
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e0bd
push 2
push ebx
push esi
call fcn.0040d7c0
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e0bd
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x40e063
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.0040e0f0
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x40e026
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.0040e170
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e042
sub ebp, eax
test ebp, ebp
jg 0x40e01b
jmp 0x40e057
cmp dword [0x411d04], 5
jne 0x40e055
mov dword [0x411d00], 0xd
mov ebx, eax
push edi
push esi
call fcn.0040e0f0
add esp, 8
jmp 0x40e0a0
jge 0x40e0a0
push 0
push ecx
push esi
call fcn.0040d7c0
add esp, 0xc
push esi
call fcn.0040df30
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x40e0a0
mov dword [0x411d00], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x411d04], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.0040d7c0
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 [0x411d00], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret