joyce8/EMBER2024-capa huggingface dataset:
Function at 0x447440
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x447473
push esi
call fcn.0044a550
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x44746c
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x4474f9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4474e2
mov eax, dword [esi + 8]
test eax, eax
je 0x447497
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x4474de
cmp eax, 2
je 0x4474e2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x44748a
cmp eax, 3
je 0x4474bd
cmp eax, 1
jne 0x44748a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x44748a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x44748a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00447520
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x447508
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00447520
add esp, 4
pop esi
ret

Function at 0x4533b0
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x453453
test eax, eax
jbe 0x453453
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x453453
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x4533fe
xor esi, esi
jmp 0x453404
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x45342f
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.004553d0
add esi, eax
push esi
mov ebx, esi
call fcn.004553d0
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x453410
pop ebp
test edi, edi
pop edi
jne 0x453453
test ebx, ebx
je 0x453453
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.00457910
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x453595
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x4536ad
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4536ad
mov eax, dword [esi + 0x3c]
push eax
call fcn.004682d9
mov esi, eax
test esi, esi
je 0x4536ad
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x4536ad
mov ecx, esi
call fcn.00453500
cmp edi, eax
jge 0x4536ad
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x453633
mov dword [esp + 0x34], 1
jmp 0x45368e
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x4536ad
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.00452ad0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc

Function at 0x468c7d
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x468cb5
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00466d07
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00466cdf
jmp 0x468cc1
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x46a36f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x46a3b1
call fcn.0046fe29
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x46a3b1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x46a3a8
xor eax, eax
jmp 0x46a3b9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0046a3bf
pop edi
pop esi
pop ebx
ret 4
Function at 0x470359
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x470387
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4703a5
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004702bf
jmp 0x4703a5
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4703a5
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004702bf
test edi, edi
mov eax, edi
jne 0x47038f
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x409770
Capabilities:
Create process on windows
Delete file
Query environment variable
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0xe20
mov eax, dword [0x41a040]
xor eax, esp
mov dword [esp + 0xe1c], eax
push ebx
push ebp
push esi
push edi
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x1e]
push ecx
mov word [esp + 0x20], ax
call fcn.004133d0
push 0x208
lea edx, [esp + 0x22c]
push 0
push edx
mov dword [esp + 0x28], 0
call fcn.004133d0
add esp, 0x18
push 0x104
lea eax, [esp + 0x220]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0xa08
lea ecx, [esp + 0x428]
push 0
push ecx
call fcn.004133d0
lea edx, [esp + 0x228]
push edx
mov eax, edx
push eax
push 0x407f28
lea edx, [esp + 0x43c]
call fcn.00409f00
add esp, 0x18
push 0x104
lea ecx, [esp + 0x18]
push ecx
push 0x407fc4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x407fdc
lea edx, [esp + 0x18]
push 0x104
push edx
call fcn.0040eb20
add esp, 0xc
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x438]
push ecx
push 0
push 0xfde9
mov ebx, eax
call ebp
mov esi, eax
push esi
call fcn.0040e5b9
add esp, 4
push 0
push 0
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
lea edx, [esp + 0x438]
push edx
push 0
push 0xfde9
call ebp
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040eb15
add esp, 4
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x40800c
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0xe2c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040e5c4
add esp, 0xe20
ret
Function at 0x409900
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x47c
mov eax, dword [0x41a040]
xor eax, esp
mov dword [esp + 0x474], eax
mov eax, dword [esp + 0x484]
push ebx
push ebp
mov ebp, dword [esp + 0x488]
push esi
push edi
push 0x40e
xor esi, esi
mov ebx, ecx
lea edx, [esp + 0x76]
xor ecx, ecx
push esi
push edx
mov dword [esp + 0x20], eax
mov word [esp + 0x7c], cx
call fcn.004133d0
push 0x44
lea eax, [esp + 0x28]
push esi
push eax
call fcn.004133d0
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x18
xor ecx, ecx
xor edx, edx
push 0xfffffffffffffff6
mov dword [esp + 0x1c], 0x44
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x48], 1
mov word [esp + 0x4c], cx
mov dword [esp + 0x50], esi
mov word [esp + 0x4e], dx
call edi
push 0xfffffffffffffff5
mov dword [esp + 0x54], eax
call edi
push 0xfffffffffffffff4
mov dword [esp + 0x58], eax
call edi
push ebp
push ebx
push 0x408018
lea edx, [esp + 0x7c]
mov dword [esp + 0x64], eax
call fcn.00409f20
mov edx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
push esi
push 0x20
push esi
push esi
push esi
lea eax, [esp + 0x90]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
cmp edi, esi
je 0x409a30
mov ecx, dword [esp + 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov eax, dword [esp + 0x60]
push 0xffffffffffffffff
push eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call esi
mov ecx, dword [esp + 0x484]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040e5c4
add esp, 0x47c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409a15
Function at 0x409a40
Capabilities:
Delete file
Query environment variable
Write file on windows

Disassembly:
sub esp, 0xc24
mov eax, dword [0x41a040]
xor eax, esp
mov dword [esp + 0xc1c], eax
push ebx
push ebp
push esi
push edi
xor eax, eax
push 0xa06
mov esi, ecx
push eax
lea ecx, [esp + 0x22a]
push ecx
mov word [esp + 0x22c], ax
call fcn.004133d0
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x22]
push eax
mov word [esp + 0x24], dx
call fcn.004133d0
add esp, 0xc
push esi
push esi
push 0x408028
lea edx, [esp + 0x22c]
mov dword [esp + 0x20], 0
call fcn.00409f00
add esp, 0xc
push 0x104
lea ecx, [esp + 0x1c]
push ecx
push 0x407ecc
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x408078
lea edx, [esp + 0x1c]
push 0x104
push edx
call fcn.0040eb20
add esp, 0xc
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x409b06
xor eax, eax
jmp 0x409b8d
mov ebp, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x234]
push ecx
push 0
push 0xfde9
call ebp
mov esi, eax
push esi
call fcn.0040e5b9
add esp, 4
push 0
push 0
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
lea edx, [esp + 0x234]
push edx
push 0
push 0xfde9
call ebp
push 0
lea eax, [esp + 0x18]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040eb15
add esp, 4
push 0
push 0
lea ecx, [esp + 0x20]
call fcn.00409900
add esp, 8
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, 1
mov ecx, dword [esp + 0xc2c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040e5c4
add esp, 0xc24
ret
Function at 0x40bcb0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x40bcb7
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x40bd94
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x404008]
inc ecx
sub edx, 8
sub esi, 1
jne 0x40bcd0
pop edi
test edx, edx
je 0x40bdbb
jmp 0x40bda0
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x404008]
inc ecx
sub edx, 1
jne 0x40bda0
not eax
pop esi
ret

Function at 0x40bdc0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x404008]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x404008]
mov dword [edx + 8], ecx
ret

Function at 0x40be10
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
push edi
xor al, bl
movsx edi, al
xor edi, edx
shr edx, 8
and edi, 0xff
mov ebx, dword [edi*4 + 0x404008]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x404008]
pop edi
mov dword [esi + 8], ecx
pop ebx
ret

Function at 0x40c640
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ebx
imul esi, dword [esp + 8]
cmp byte [edi], 0
je 0x40c672
mov ecx, dword [edi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c668
mov byte [edi + 8], 1
mov eax, dword [esp + 8]
xor edx, edx
div ebx
pop esi
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
push ebp
lea ebp, [ecx + esi]
cmp ebp, eax
pop ebp
jbe 0x40c685
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
push esi
add eax, ecx
push eax
push edx
call fcn.00413450
add dword [edi + 0x1c], esi
mov eax, esi
add esp, 0xc
xor edx, edx
div ebx
pop esi
ret
Function at 0x40c6a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
cmp byte [esi], 0
push edi
mov edi, 1
je 0x40c6d3
mov edx, dword [esi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push edi
lea ecx, [esp + 0x13]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c6cd
mov byte [esi + 8], 1
mov edi, dword [esp + 8]
jmp 0x40c6ff
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [esi + 0x1c]
lea ecx, [ebx + 1]
cmp ecx, eax
jbe 0x40c6e5
sub eax, ebx
mov edi, eax
mov edx, dword [esi + 0x14]
push edi
add edx, ebx
push edx
lea eax, [esp + 0x13]
push eax
call fcn.00413450
add esp, 0xc
add ebx, edi
mov dword [esi + 0x1c], ebx
pop ebx
cmp edi, 1
pop edi
jne 0x40c716
movzx ecx, byte [esp + 3]
mov edx, dword [esp + 0xc]
mov dword [edx], ecx
xor eax, eax
add esp, 8
ret
cmp byte [esi], 0
je 0x40c710
cmp byte [esi + 8], 0
je 0x40c710
or eax, 0xffffffff
add esp, 8
ret
Function at 0x40c7b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
cmp byte [esi], 0
je 0x40c7f5
cmp byte [esi + 1], 0
je 0x40c7fd
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebp
je 0x40c812
cmp byte [esi + 1], 0
je 0x40c804
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
sub ebp, dword [esi + 0xc]
mov dword [esp + 4], ebp
jmp 0x40c81b
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x40c7ce
or eax, 0xffffffff
add esp, 0x18
ret
mov dword [esp + 4], 0
mov ebp, dword [esp + 4]
jmp 0x40c81b
mov eax, dword [esi + 0x1c]
mov dword [esp + 4], eax
mov ebp, eax
push edi
mov edi, 0xffff
mov dword [esp + 0xc], edi
cmp ebp, edi
jae 0x40c82f
mov dword [esp + 0xc], ebp
mov edi, ebp
push ebx
push 0x404
call fcn.0040ed29
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40c84d
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret
mov eax, 4
mov dword [esp + 0x18], 0xffffffff
cmp edi, eax
jbe 0x40c961
jmp 0x40c870
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
add eax, 0x400
mov dword [esp + 0x14], edi
cmp eax, edi
ja 0x40c881
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, dword [esp + 0x14]
sub ebp, eax
mov dword [esp + 0x20], eax
cmp ebp, 0x404
jbe 0x40c89a
mov ebp, 0x404
cmp byte [esi], 0
je 0x40c8bf
cmp byte [esi + 1], 0
je 0x40c961
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40c8c2
mov dword [esi + 0x1c], eax
cmp byte [esi], 0
mov edi, ebp
je 0x40c8ea
mov ecx, dword [esi + 4]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c8e4
mov byte [esi + 8], 1
mov eax, dword [esp + 0x1c]
jmp 0x40c910
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x40c8fb
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
push edi
add ecx, eax
push ecx
push ebx
call fcn.00413450
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebp
cmp eax, 1
jne 0x40c961
lea eax, [ebp - 3]
test eax, eax
jl 0x40c94c
dec eax
cmp byte [eax + ebx], 0x50
jne 0x40c93c
cmp byte [eax + ebx + 1], 0x4b
jne 0x40c93c
cmp byte [eax + ebx + 2], 5
jne 0x40c93c
cmp byte [eax + ebx + 3], 6
je 0x40c942
test eax, eax
jge 0x40c920
jmp 0x40c94c
mov edx, dword [esp + 0x20]
add eax, edx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x40c961
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jb 0x40c864
push ebx
call fcn.0040ec0c
mov eax, dword [esp + 0x1c]
add esp, 4
pop ebx
pop edi
pop ebp
add esp, 0x18
ret
Function at 0x40d330
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x40d34e
pop edi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0xc
ret
cmp dword [edi + 0x18], ebx
je 0x40d342
cmp dword [edi + 0x7c], ebx
je 0x40d35d
call fcn.0040d720
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.0040d0a0
add esp, 0xc
test eax, eax
je 0x40d384
pop edi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 0xc
ret
push esi
push 0x84
call fcn.0040ed29
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40d3c5
push 0x4000
call fcn.0040ed29
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add esp, 4
mov dword [esi], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
cmp eax, ebx
jne 0x40d3d2
push esi
call fcn.0040ec0c
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 0xffffff98
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x40], ebx
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp dword [edi + 0x34], ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
sete al
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
cmp eax, ebx
jne 0x40d41a
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.0040c0d0
test eax, eax
jne 0x40d41a
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov dword [esi + 0x58], eax
mov ecx, dword [edi + 0x44]
mov dword [esi + 0x5c], ecx
mov dl, byte [edi + 0x30]
and dl, 1
mov byte [esi + 0x6c], dl
mov eax, dword [edi + 0x30]
shr eax, 3
test al, 1
je 0x40d444
mov cl, byte [edi + 0x39]
mov byte [esi + 0x80], cl
jmp 0x40d44d
mov dl, byte [edi + 0x3f]
mov byte [esi + 0x80], dl
movzx eax, byte [esi + 0x6c]
neg eax
sbb eax, eax
and eax, 0xc
lea edx, [esi + 0x70]
mov dword [esi + 0x7c], eax
mov dword [edx], 0x12345678
mov dword [esi + 0x74], 0x23456789
mov dword [esi + 0x78], 0x34567890
cmp ebp, ebx
je 0x40d487
mov cl, byte [ebp]
cmp cl, bl
je 0x40d487
call fcn.0040bdc0
add ebp, 1
jne 0x40d476
mov ecx, dword [edi + 0x78]
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx + 0x1e]
mov dword [esi + 0x3c], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x7c], esi
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
Function at 0x40d820
Capabilities:
Get common file path

Disassembly:
push ecx
cmp dword [esi], 0
push ebp
mov ebp, dword [esp + 0x10]
push edi
jne 0x40d8f1
cmp dword [esi + 4], 0xffffffff
jne 0x40d8f1
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d851
sub eax, edx
sar eax, 1
movzx eax, word [esi + eax*2 + 0x242]
cmp ax, 0x5c
je 0x40d893
cmp ax, 0x2f
je 0x40d893
add edi, 0xfffffffe
jmp 0x40d880
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40d880
mov eax, dword [0x407ef8]
mov dword [edi], eax
cmp ebp, 1
jne 0x40d8b4
push ebp
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40d8b4
mov eax, 0x2000000
pop edi
pop ebp
pop ecx
ret 8
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push ebp
push edx
push ebx
call fcn.0040c520
add esp, 0x10
test eax, eax
jne 0x40d8d6
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop ecx
ret 8
call fcn.0040c980
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
pop edi
pop ebp
pop ecx
ret 8
pop edi
mov eax, 0x1000000
pop ebp
pop ecx
ret 8

Function at 0x40df30
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x414
mov eax, dword [0x41a040]
xor eax, esp
mov dword [esp + 0x410], eax
push ebx
mov ebx, dword [esp + 0x420]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
mov esi, dword [esp + 0x424]
test esi, esi
je 0x40df70
push esi
call ebp
cmp eax, 0xffffffff
jne 0x40df70
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x40e056
mov ecx, ebx
mov edx, ebx
movzx eax, ax
cmp ax, 0x2f
je 0x40df8f
cmp ax, 0x5c
jne 0x40df91
mov ecx, edx
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
jne 0x40df83
push edi
cmp ecx, ebx
je 0x40dfd4
sub ecx, ebx
sar ecx, 1
add ecx, ecx
mov edi, ecx
push edi
lea eax, [esp + 0x21c]
push ebx
push eax
call fcn.00413450
lea edx, [esp + 0x224]
push edx
xor ecx, ecx
push esi
mov word [esp + edi + 0x22c], cx
call fcn.0040df30
add esp, 0x14
xor eax, eax
mov word [esp + 0x10], ax
test esi, esi
je 0x40dfff
lea edx, [esp + 0x10]
mov eax, esi
sub edx, esi
jmp 0x40dff0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40dff0
mov eax, ebx
mov edx, ebx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40e003
lea edi, [esp + 0x10]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40e020
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40e020
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
call ebp
pop edi
cmp eax, 0xffffffff
jne 0x40e056
push 0
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [esp + 0x41c]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040e5c4
add esp, 0x414
ret