joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401120
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401139
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40114d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40116e
cmp esi, eax
jae 0x401147
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401160
cmp esi, eax
jae 0x401147
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402e40
Capabilities:
Get common file path

Disassembly:
push 0x42ca68
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, 0x42ca68
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402e58
sub eax, edx
push edi
lea edi, [eax + 0x42ca68]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402e70
mov ax, word [0x421310]
push 0x42cc70
push 0x104
mov word [edi], ax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x421308
push 0x42cc70
call fcn.004080fa
lea ecx, [eax*2 + 0x42cc70]
add esp, 4
push ecx
call fcn.00407e1d
add esp, 8
pop edi
ret

Function at 0x4032a0
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x60]
xor ebx, ebx
push ebx
push eax
mov dword [esi], 0x421350
call dword [sym.imp.KERNEL32.dll_TerminateThread]
cmp dword [esi + 0x5c], 0x10
jb 0x4032c9
mov ecx, dword [esi + 0x48]
push ecx
call fcn.00414c07
add esp, 4
mov dword [esi + 0x5c], 0xf
mov dword [esi + 0x58], ebx
mov byte [esi + 0x48], bl
cmp dword [esi + 0x40], 0x10
jb 0x4032e8
mov edx, dword [esi + 0x2c]
push edx
call fcn.00414c07
add esp, 4
mov dword [esi + 0x40], 0xf
mov dword [esi + 0x3c], ebx
mov byte [esi + 0x2c], bl
cmp dword [esi + 0x24], 8
jb 0x403307
mov eax, dword [esi + 0x10]
push eax
call fcn.00414c07
add esp, 4
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], 7
mov word [esi + 0x10], bx
pop esi
pop ebx
ret
Function at 0x403320
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x420
mov eax, dword [0x426990]
push ebx
push edi
mov ebx, ecx
push 0x421370
push ebx
mov dword [esp + 0x42c], eax
call fcn.004083c0
add esp, 8
test eax, eax
je 0x403365
mov edi, edi
push 0x421370
push ebx
mov byte [eax], 0x2f
call fcn.004083c0
add esp, 8
test eax, eax
jne 0x403350
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.004080fa
add esp, 4
push eax
lea ecx, [esi + 0xc]
lea eax, [esp + 0x14]
call fcn.00402fe0
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4033b1
sub eax, edx
push eax
push ebx
lea ecx, [esi + 0x28]
call fcn.00402140
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 0x4033d0
sub eax, edi
push eax
push ecx
lea ecx, [esi + 0x44]
call fcn.00402140
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 0x403490
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x42bfb0
mov dword [esi + 0x60], eax
call ebx
mov edi, dword [esi + 0x64]
push 0x42bfb0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x403471
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x42bfb0
call ebx
mov edi, dword [esi + 0x64]
push 0x42bfb0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x403450
mov eax, dword [esi + 0x68]
mov ecx, dword [esp + 0x424]
test eax, eax
setne al
call fcn.00408be3
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x403d10
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], 0x42137c
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [edi + 0x3f4], 0x421378
mov eax, dword [edi + 0x450]
mov ebp, 0x10
cmp eax, ebp
jb 0x403d54
mov ecx, dword [edi + 0x43c]
push ecx
call fcn.00414c07
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], 0x421378
cmp dword [edi + 0x3ec], ebp
jb 0x403d8c
mov edx, dword [edi + 0x3d8]
push edx
call fcn.00414c07
add esp, 4
mov dword [edi + 0x3ec], esi
mov dword [edi + 0x3e8], ebx
mov byte [edi + 0x3d8], bl
cmp dword [edi + 0x124], ebp
jb 0x403db5
mov eax, dword [edi + 0x110]
push eax
call fcn.00414c07
add esp, 4
mov dword [edi + 0x124], esi
mov dword [edi + 0x120], ebx
lea esi, [edi + 0x100]
mov byte [edi + 0x110], bl
call fcn.00404f50
lea esi, [edi + 0xf4]
call fcn.00404f50
cmp dword [edi + 0xec], ebp
jb 0x403df4
mov ecx, dword [edi + 0xd8]
push ecx
call fcn.00414c07
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 0x403e22
mov edx, dword [edi + 0xbc]
push edx
call fcn.00414c07
add esp, 4
mov dword [edi + 0xd0], esi
mov dword [edi + 0xcc], ebx
mov byte [edi + 0xbc], bl
cmp dword [edi + 0xb4], ebp
jb 0x403e4b
mov eax, dword [edi + 0xa0]
push eax
call fcn.00414c07
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.004032a0

Function at 0x404b90
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 0x404b97
sub eax, edi
push eax
push edx
lea ecx, [esi + 0xd4]
call fcn.00402140
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 0x404bf0
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 0x405160
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41ccd8
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.00402050
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x2c], ebx
push ebx
or eax, 0xffffffff
lea ebx, [esp + 0xc]
call fcn.00402d50
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.00402050
cmp dword [esp + 0x20], 0x10
pop ebx
jb 0x4051e4
mov ecx, dword [esp + 8]
push ecx
call fcn.00414c07
add esp, 4
mov ecx, dword [esp + 0x20]
mov eax, esi
mov dword fs:[0], ecx
add esp, 0x2c
ret

Function at 0x405420
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 0x40545d
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 0x405464
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 0x4054c0
push 0xfffffffffffffff0
push eax
call edi
test eax, 0xc00000
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
je 0x40548e
push 4
call ebx
mov dword [esi + 0x2e0], eax
mov ecx, dword [esi + 0xc]
push 0xfffffffffffffff0
push ecx
call edi
test eax, 0x800000
je 0x4054a7
push 5
call ebx
mov dword [esi + 0x2e4], eax
mov edx, dword [esi + 0xc]
push 0xfffffffffffffff0
push edx
call edi
test eax, 0x40000
je 0x4054c0
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 0x405ba0
push 0xfffffffffffffffc
push eax
call ebx
pop ebx
mov dword [esi + 0x10], eax
mov eax, 1
pop edi
add esp, 0x10
ret
Function at 0x407a47
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.00409830
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407ae2
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 [0x42b958]
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 0x407ae2
cmp eax, 1
je 0x407b03
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 0x407ae2
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x407aaf
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x407ade
xor eax, eax
inc eax
jmp 0x407b22
cmp edi, eax
jae 0x407ae6
xor eax, eax
jmp 0x407b22
cmp eax, esi
jae 0x407aed
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 [0x42b958]
jmp 0x407b06
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 0x407f0b
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41fc10
call fcn.00409f18
push 8
call fcn.0040b2ba
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x42b998], esi
jne 0x407f3f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42b994], esi
mov al, byte [ebp + 0x10]
mov byte [0x42b990], al
cmp dword [ebp + 0xc], edi
jne 0x407f89
cmp dword [0x4385cc], edi
je 0x407f79
mov eax, dword [0x4385c8]
sub eax, 4
mov dword [0x4385c8], eax
cmp eax, dword [0x4385cc]
jb 0x407f79
mov eax, dword [eax]
cmp eax, edi
je 0x407f5a
call eax
jmp 0x407f5a
push 0x4260b4
mov eax, 0x4260ac
call fcn.00407e89
pop ecx
push 0x4260c0
mov eax, 0x4260b8
call fcn.00407e89
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x407fba
cmp dword [ebp + 0x10], edi
jne 0x407fc8
mov dword [0x42b998], esi
push dword [ebp + 8]
call fcn.00407e47
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x407fc7
push 8
call fcn.0040b205
pop ecx
ret
call fcn.00409f53
ret
Function at 0x408986
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41fcb0
call fcn.00409f18
mov edi, 0x94
mov eax, edi
call fcn.00409830
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 [0x42b958], ecx
mov eax, dword [esi + 4]
mov dword [0x42b964], eax
mov edx, dword [esi + 8]
mov dword [0x42b968], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x42b95c], esi
cmp ecx, 2
je 0x4089e6
or esi, 0x8000
mov dword [0x42b95c], esi
shl eax, 8
add eax, edx
mov dword [0x42b960], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x408a21
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x408a21
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x408a39
cmp eax, 0x20b
je 0x408a26
mov dword [ebp - 0x1c], esi
jmp 0x408a4d
cmp dword [ecx + 0x84], 0xe
jbe 0x408a21
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x408a47
cmp dword [ecx + 0x74], 0xe
jbe 0x408a21
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040b116
pop ecx
test eax, eax
jne 0x408a61
push 0x1c
call fcn.00408962
pop ecx
call fcn.0040c007
test eax, eax
jne 0x408a72
push 0x10
call fcn.00408962
pop ecx
call fcn.0040c0f6
mov dword [ebp - 4], esi
call fcn.0040dad8
test eax, eax
jge 0x408a8b
push 0x1b
call fcn.0040893d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4385c0], eax
call fcn.0040e5db
mov dword [0x42b99c], eax
call fcn.0040e539
test eax, eax
jge 0x408ab1
push 8
call fcn.0040893d
pop ecx
call fcn.0040e306
test eax, eax
jge 0x408ac2
push 9
call fcn.0040893d
pop ecx
push 1
call fcn.00407ea1
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x408ad8
push eax
call fcn.0040893d
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040e2a9
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x408af9
movzx eax, word [ebp - 0x40]
jmp 0x408afc
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00412d68
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x408b1a
push edi
call fcn.00407fce
call fcn.00407ff0
jmp 0x408b4c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00409f53
ret
Function at 0x40cf94
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x426990]
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 0x40cfc5
xor eax, eax
jmp 0x40d14e
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 + 0x437240]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40d001
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0041063e
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40d0dc
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40d11a
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 0x40d065
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40d056
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 0x40d036
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 0x40d0a5
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40d0ae
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40d027
jmp 0x40d0b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40d149
cmp dword [ebp - 0x6c], edi
je 0x40d11a
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40d10f
call fcn.0040a22a
mov dword [eax], 9
call fcn.0040a233
mov dword [eax], esi
jmp 0x40d144
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 0x40d104
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40d0b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40d0b0
push dword [ebp - 0x6c]
call fcn.0040a23c
pop ecx
jmp 0x40d144
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40d132
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40d132
xor eax, eax
jmp 0x40d14c
call fcn.0040a22a
mov dword [eax], 0x1c
call fcn.0040a233
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40d14c
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00408be3
add ebp, 0x3a0
leave
ret
Function at 0x40d752
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 0x40d926
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x437240]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40d926
test cl, 0x48
je 0x40d7bd
cmp byte [eax + 5], 0xa
je 0x40d7bd
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 0x40d80f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40d7f7
call fcn.0040a22a
mov dword [eax], 9
call fcn.0040a233
mov dword [eax], esi
jmp 0x40d807
cmp eax, 0x6d
je 0x40d926
push eax
call fcn.0040a23c
pop ecx
or eax, 0xffffffff
jmp 0x40d928
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40d921
test eax, eax
je 0x40d836
cmp byte [ebx], 0xa
jne 0x40d836
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40d83f
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 0x40d91b
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40d90b
cmp al, 0xd
je 0x40d871
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40d8fd
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40d88b
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40d886
add dword [ebp + 0x10], 2
jmp 0x40d8df
mov dword [ebp + 0x10], eax
jmp 0x40d8f9
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 0x40d8b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40d8f9
cmp dword [ebp - 0xc], 0
je 0x40d8f9
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40d8d4
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40d8df
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40d8fc
cmp ebx, dword [ebp + 0xc]
jne 0x40d8e4
cmp byte [ebp - 1], 0xa
jne 0x40d8e4
mov byte [ebx], 0xa
jmp 0x40d8fc
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040dcd6
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40d8fd
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40d855
jmp 0x40d91b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40d91b
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 0x40d928
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40df95
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x426990]
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 + 0x4271d0]
je 0x40dfca
inc eax
cmp eax, 0x13
jb 0x40dfbb
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4271d0]
jne 0x40e0f0
mov eax, dword [0x42b9a4]
cmp eax, 1
je 0x40e0c8
cmp eax, edx
jne 0x40dffa
cmp dword [0x42698c], 1
je 0x40e0c8
cmp ecx, 0xfc
je 0x40e0f0
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 0x40e030
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040d9e0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00409420
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40e064
mov eax, edi
push eax
call fcn.00409420
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x420428
push edi
call fcn.00407c90
add esp, 0x10
push edi
call fcn.00409420
push dword [esi + 0x4271d4]
mov ebx, eax
call fcn.00409420
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00409830
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040d9e0
push edi
push ebx
call fcn.0040d9f0
push 0x420408
push ebx
call fcn.0040d9f0
push dword [esi + 0x4271d4]
push ebx
call fcn.0040d9f0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00410d49
add esp, 0x2c
jmp 0x40e0f0
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4271d4]
push dword [esi]
call fcn.00409420
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.00408be3
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret