joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403490
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x420
mov eax, dword [0x428990]
push ebx
push edi
mov ebx, ecx
push 0x4233a8
push ebx
mov dword [esp + 0x42c], eax
call fcn.0040a550
add esp, 8
test eax, eax
je 0x4034d5
mov edi, edi
push 0x4233a8
push ebx
mov byte [eax], 0x2f
call fcn.0040a550
add esp, 8
test eax, eax
jne 0x4034c0
xor eax, eax
mov word [esp + 0x10], 0
mov ecx, 0x103
lea edi, [esp + 0x12]
rep stosd dword es:[edi], eax
push 0x207
stosw word es:[edi], ax
lea eax, [esp + 0x14]
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [esp + 0x10]
push ecx
call fcn.0040a28b
add esp, 4
push eax
lea ecx, [esi + 0xc]
lea eax, [esp + 0x14]
call fcn.00403150
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403521
sub eax, edx
push eax
push ebx
lea ecx, [esi + 0x28]
call fcn.004017f0
mov ecx, dword [ebp + 8]
mov eax, ecx
lea edi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403540
sub eax, edi
push eax
push ecx
lea ecx, [esi + 0x44]
call fcn.004017f0
mov ebx, dword [sym.imp.WINMM.dll_timeGetTime]
xor edi, edi
mov dword [esi + 0x6c], edi
mov dword [esi + 0x70], edi
call ebx
mov dword [esi + 0x74], eax
call ebx
mov edx, dword [esi + 0x60]
mov dword [esi + 0x78], eax
mov eax, 1
push edi
push edx
mov dword [esi + 0x7c], edi
mov dword [esi + 0x80], edi
mov dword [esi + 0x64], eax
mov dword [esi + 0x68], eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea eax, [esp + 0xc]
push eax
push edi
push esi
push 0x403600
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x42df90
mov dword [esi + 0x60], eax
call ebx
mov edi, dword [esi + 0x64]
push 0x42df90
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x4035e1
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x42df90
call ebx
mov edi, dword [esi + 0x64]
push 0x42df90
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x4035c0
mov eax, dword [esi + 0x68]
mov ecx, dword [esp + 0x424]
test eax, eax
setne al
call fcn.0040b25c
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x403f00
Capabilities:
Terminate thread

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x458]
xor ebx, ebx
push ebx
push eax
mov dword [edi], 0x4233c8
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [edi + 0x3f4], 0x4233c4
mov eax, dword [edi + 0x450]
mov ebp, 0x10
cmp eax, ebp
jb 0x403f44
mov ecx, dword [edi + 0x43c]
push ecx
call fcn.0041744c
add esp, 4
mov esi, 0xf
mov dword [edi + 0x450], esi
mov dword [edi + 0x44c], ebx
mov byte [edi + 0x43c], bl
mov dword [edi + 0x390], 0x4233c4
cmp dword [edi + 0x3ec], ebp
jb 0x403f7c
mov edx, dword [edi + 0x3d8]
push edx
call fcn.0041744c
add esp, 4
mov dword [edi + 0x3ec], esi
mov dword [edi + 0x3e8], ebx
mov byte [edi + 0x3d8], bl
cmp dword [edi + 0x124], ebp
jb 0x403fa5
mov eax, dword [edi + 0x110]
push eax
call fcn.0041744c
add esp, 4
mov dword [edi + 0x124], esi
mov dword [edi + 0x120], ebx
lea esi, [edi + 0x100]
mov byte [edi + 0x110], bl
call fcn.004064a0
lea esi, [edi + 0xf4]
call fcn.004064a0
cmp dword [edi + 0xec], ebp
jb 0x403fe4
mov ecx, dword [edi + 0xd8]
push ecx
call fcn.0041744c
add esp, 4
mov esi, 0xf
mov dword [edi + 0xec], esi
mov dword [edi + 0xe8], ebx
mov byte [edi + 0xd8], bl
cmp dword [edi + 0xd0], ebp
jb 0x404012
mov edx, dword [edi + 0xbc]
push edx
call fcn.0041744c
add esp, 4
mov dword [edi + 0xd0], esi
mov dword [edi + 0xcc], ebx
mov byte [edi + 0xbc], bl
cmp dword [edi + 0xb4], ebp
jb 0x40403b
mov eax, dword [edi + 0xa0]
push eax
call fcn.0041744c
add esp, 4
mov dword [edi + 0xb4], esi
mov dword [edi + 0xb0], ebx
mov byte [edi + 0xa0], bl
mov ecx, edi
pop edi
pop esi
pop ebp
pop ebx
jmp fcn.00403410

Function at 0x404dd0
Capabilities:
Create thread
Terminate thread

Disassembly:
push ecx
mov eax, edx
push edi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404dd7
sub eax, edi
push eax
push edx
lea ecx, [esi + 0xd4]
call fcn.004017f0
mov ecx, dword [esi + 0x458]
mov ax, word [esp + 0xc]
push 0
push ecx
mov word [esi + 0xf0], ax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea edx, [esp + 4]
push edx
push 0
push esi
push 0x404e30
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x458], eax
mov al, 1
pop edi
pop ecx
ret 4
Function at 0x4061f0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41f528
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
mov ecx, dword [eax - 0x10]
mov edx, dword [ecx]
push edi
xor edi, edi
mov dword [esp + 8], edi
call dword [edx + 0x10]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], edi
mov eax, dword [eax]
mov edx, dword [eax - 0xc]
mov ecx, dword [esi]
mov esi, dword [ecx - 0xc]
push edx
push eax
push esi
push ecx
lea ecx, [esp + 0x30]
push ecx
call fcn.004063d0
mov esi, dword [esp + 0x34]
add esi, 0xfffffff0
push esi
call fcn.00401790
mov edi, dword [esp + 0x34]
add eax, 0x10
mov dword [edi], eax
add esp, 0x18
mov dword [esp + 0x14], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x406282
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov ecx, dword [esp + 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x406ae0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41f618
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [esp + 0x30]
push ebx
xor ebx, ebx
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], ebx
mov byte [esp + 0x18], bl
call fcn.00401570
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x2c], ebx
push ebx
or eax, 0xffffffff
lea ebx, [esp + 0xc]
call fcn.00402620
xor ecx, ecx
push 0xffffffffffffffff
mov dword [esi + 0x14], ecx
push ecx
mov dword [esi + 0x18], 0xf
mov byte [esi + 4], cl
push eax
mov ecx, esi
call fcn.00401570
cmp dword [esp + 0x20], 0x10
pop ebx
jb 0x406b64
mov ecx, dword [esp + 8]
push ecx
call fcn.0041744c
add esp, 4
mov ecx, dword [esp + 0x20]
mov eax, esi
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x4074a0
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x10
push edi
mov edi, eax
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4074dd
push edi
mov dword [esi + 8], edi
call dword [sym.imp.USER32.dll_GetParent]
push esi
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
push str.CWINBUTTON
push eax
call dword [sym.imp.USER32.dll_SetPropA]
test eax, eax
jne 0x4074e4
push str.SetProp_ERROR
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
pop edi
add esp, 0x10
ret
mov eax, dword [esi + 0xc]
test eax, eax
mov edi, dword [sym.imp.USER32.dll_GetWindowLongA]
push ebx
je 0x407540
push 0xfffffffffffffff0
push eax
call edi
test eax, 0xc00000
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
je 0x40750e
push 4
call ebx
mov dword [esi + 0x2e0], eax
mov ecx, dword [esi + 0xc]
push 0xfffffffffffffff0
push ecx
call edi
test eax, 0x800000
je 0x407527
push 5
call ebx
mov dword [esi + 0x2e4], eax
mov edx, dword [esi + 0xc]
push 0xfffffffffffffff0
push edx
call edi
test eax, 0x40000
je 0x407540
push 0x2d
call ebx
mov dword [esi + 0x2e8], eax
mov eax, dword [esi + 8]
push 0xfffffffffffffff0
push eax
call edi
mov ecx, dword [esi + 8]
mov ebx, dword [sym.imp.USER32.dll_SetWindowLongA]
or eax, 0xb
push eax
push 0xfffffffffffffff0
push ecx
call ebx
mov eax, dword [esi + 8]
lea edx, [esp + 8]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
push 5
push 5
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_CreateRoundRectRgn]
mov edx, dword [esi + 8]
push 1
mov edi, eax
push edi
push edx
call dword [sym.imp.USER32.dll_SetWindowRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esi + 8]
push 0x407c20
push 0xfffffffffffffffc
push eax
call ebx
pop ebx
mov dword [esi + 0x10], eax
mov eax, 1
pop edi
add esp, 0x10
ret
Function at 0x409df7
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040c070
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409e92
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x42d944]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x409e92
cmp eax, 1
je 0x409eb3
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409e92
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x409e5f
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x409e8e
xor eax, eax
inc eax
jmp 0x409ed2
cmp edi, eax
jae 0x409e96
xor eax, eax
jmp 0x409ed2
cmp eax, esi
jae 0x409e9d
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x42d944]
jmp 0x409eb6
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40afff
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x421cb8
call fcn.0040c758
mov edi, 0x94
mov eax, edi
call fcn.0040c070
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x42d944], ecx
mov eax, dword [esi + 4]
mov dword [0x42d950], eax
mov edx, dword [esi + 8]
mov dword [0x42d954], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x42d948], esi
cmp ecx, 2
je 0x40b05f
or esi, 0x8000
mov dword [0x42d948], esi
shl eax, 8
add eax, edx
mov dword [0x42d94c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40b09a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40b09a
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40b0b2
cmp eax, 0x20b
je 0x40b09f
mov dword [ebp - 0x1c], esi
jmp 0x40b0c6
cmp dword [ecx + 0x84], 0xe
jbe 0x40b09a
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40b0c0
cmp dword [ecx + 0x74], 0xe
jbe 0x40b09a
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040e2f7
pop ecx
test eax, eax
jne 0x40b0da
push 0x1c
call fcn.0040afdb
pop ecx
call fcn.0040f1e8
test eax, eax
jne 0x40b0eb
push 0x10
call fcn.0040afdb
pop ecx
call fcn.00410ebd
mov dword [ebp - 4], esi
call fcn.00410298
test eax, eax
jge 0x40b104
push 0x1b
call fcn.0040afb6
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x43a5b0], eax
call fcn.00410d9b
mov dword [0x42d934], eax
call fcn.00410cf9
test eax, eax
jge 0x40b12a
push 8
call fcn.0040afb6
pop ecx
call fcn.00410ac6
test eax, eax
jge 0x40b13b
push 9
call fcn.0040afb6
pop ecx
push 1
call fcn.0040b7b1
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40b151
push eax
call fcn.0040afb6
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00410a69
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40b172
movzx eax, word [ebp - 0x40]
jmp 0x40b175
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004155a8
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40b193
push edi
call fcn.0040b8de
call fcn.0040b900
jmp 0x40b1c5
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040c793
ret
Function at 0x40b81b
Capabilities:
Terminate process

Disassembly:
push 8
push 0x421cf0
call fcn.0040c758
push 8
call fcn.0040e49b
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x42d984], esi
jne 0x40b84f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42d980], esi
mov al, byte [ebp + 0x10]
mov byte [0x42d97c], al
cmp dword [ebp + 0xc], edi
jne 0x40b899
cmp dword [0x43a5a8], edi
je 0x40b889
mov eax, dword [0x43a5a4]
sub eax, 4
mov dword [0x43a5a4], eax
cmp eax, dword [0x43a5a8]
jb 0x40b889
mov eax, dword [eax]
cmp eax, edi
je 0x40b86a
call eax
jmp 0x40b86a
push 0x4280b4
mov eax, 0x4280ac
call fcn.0040b799
pop ecx
push 0x4280c0
mov eax, 0x4280b8
call fcn.0040b799
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40b8ca
cmp dword [ebp + 0x10], edi
jne 0x40b8d8
mov dword [0x42d984], esi
push dword [ebp + 8]
call fcn.0040b757
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40b8d7
push 8
call fcn.0040e3e6
pop ecx
ret
call fcn.0040c793
ret
Function at 0x40f753
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x428990]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40f784
xor eax, eax
jmp 0x40f90d
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x439220]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40f7c0
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00412e7e
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40f89b
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40f8d9
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40f824
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40f815
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40f7f5
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f864
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40f86d
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40f7e6
jmp 0x40f86f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40f908
cmp dword [ebp - 0x6c], edi
je 0x40f8d9
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40f8ce
call fcn.0040ca6a
mov dword [eax], 9
call fcn.0040ca73
mov dword [eax], esi
jmp 0x40f903
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f8c3
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40f86f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40f86f
push dword [ebp - 0x6c]
call fcn.0040ca7c
pop ecx
jmp 0x40f903
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40f8f1
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40f8f1
xor eax, eax
jmp 0x40f90b
call fcn.0040ca6a
mov dword [eax], 0x1c
call fcn.0040ca73
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40f90b
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0040b25c
add ebp, 0x3a0
leave
ret
Function at 0x40ff12
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x4100e6
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x439220]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4100e6
test cl, 0x48
je 0x40ff7d
cmp byte [eax + 5], 0xa
je 0x40ff7d
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40ffcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40ffb7
call fcn.0040ca6a
mov dword [eax], 9
call fcn.0040ca73
mov dword [eax], esi
jmp 0x40ffc7
cmp eax, 0x6d
je 0x4100e6
push eax
call fcn.0040ca7c
pop ecx
or eax, 0xffffffff
jmp 0x4100e8
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x4100e1
test eax, eax
je 0x40fff6
cmp byte [ebx], 0xa
jne 0x40fff6
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40ffff
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x4100db
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4100cb
cmp al, 0xd
je 0x410031
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4100bd
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x41004b
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x410046
add dword [ebp + 0x10], 2
jmp 0x41009f
mov dword [ebp + 0x10], eax
jmp 0x4100b9
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x410073
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4100b9
cmp dword [ebp - 0xc], 0
je 0x4100b9
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x410094
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x41009f
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4100bc
cmp ebx, dword [ebp + 0xc]
jne 0x4100a4
cmp byte [ebp - 1], 0xa
jne 0x4100a4
mov byte [ebx], 0xa
jmp 0x4100bc
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00410496
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4100bd
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x410015
jmp 0x4100db
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4100db
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x4100e8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x410755
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x428990]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4291c0]
je 0x41078a
inc eax
cmp eax, 0x13
jb 0x41077b
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4291c0]
jne 0x4108b0
mov eax, dword [0x42d93c]
cmp eax, 1
je 0x410888
cmp eax, edx
jne 0x4107ba
cmp dword [0x42898c], 1
je 0x410888
cmp ecx, 0xfc
je 0x4108b0
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4107f0
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004101a0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040bc60
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x410824
mov eax, edi
push eax
call fcn.0040bc60
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x422438
push edi
call fcn.0040a040
add esp, 0x10
push edi
call fcn.0040bc60
push dword [esi + 0x4291c4]
mov ebx, eax
call fcn.0040bc60
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040c070
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004101a0
push edi
push ebx
call fcn.004101b0
push 0x422418
push ebx
call fcn.004101b0
push dword [esi + 0x4291c4]
push ebx
call fcn.004101b0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00413589
add esp, 0x2c
jmp 0x4108b0
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4291c4]
push dword [esi]
call fcn.0040bc60
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040b25c
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret