joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43a910
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46a948
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
lea eax, [esp + 0xc]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
push 0
lea ecx, [esp + 0x20]
call fcn.00463818
mov eax, dword [esi + 0xd0]
lea edx, [esp + 0x1c]
push eax
push eax
push edx
mov dword [esp + 0x44], 0
call fcn.0043a2b0
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
add eax, 0x64
add esp, 0xc
add ecx, 0x64
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00463746
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
push 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 1]
xor edx, edx
test eax, eax
setl dl
dec edx
mov ecx, esi
and eax, edx
push eax
push 0
push 0
call fcn.0046000c
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
push 1
shr eax, 0x1f
lea eax, [edx + eax + 1]
test eax, eax
setl cl
dec ecx
and eax, ecx
mov ecx, esi
push eax
push 0
push 1
call fcn.0046000c
push 1
push 0
push 0
mov ecx, esi
call fcn.0045ffb4
push 1
push 0
push 1
mov ecx, esi
call fcn.0045ffb4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0046388a
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x43aa90
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46a968
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.00463818
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov dword [esp + 0x44], 0
call fcn.0043a2b0
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
add ecx, 0x64
add esp, 0xc
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
add eax, 0x96
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.00463746
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x43ab54
cmp dword [esp + 0x40], 1
jne 0x43ab52
cmp ecx, eax
jge 0x43ab54
mov eax, ecx
cmp eax, 0xc8
jge 0x43ab60
mov eax, 0xc8
mov ecx, esi
mov dword [esi + 0xd0], eax
call fcn.0043a910
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0046388a
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x43b2d0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46a9d3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0045e427
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.00463ac0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.00464fdc
test eax, eax
je 0x43b3ec
mov ecx, dword [esp + 0x3c]
call fcn.00463aed
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x43b3b0
push edi
mov ecx, esi
call fcn.0046115a
mov ecx, esi
call fcn.0043b550
cmp dword [esp + 0x38], 1
jne 0x43b3e5
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.00461295
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x43de20
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x43de53
push esi
call fcn.00440f30
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x43de4c
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 0x43ded9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x43dec2
mov eax, dword [esi + 8]
test eax, eax
je 0x43de77
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 0x43debe
cmp eax, 2
je 0x43dec2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x43de6a
cmp eax, 3
je 0x43de9d
cmp eax, 1
jne 0x43de6a
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 0x43de6a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x43de6a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.0043df00
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x43dee8
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.0043df00
add esp, 4
pop esi
ret

Function at 0x449a40
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 0x449ae3
test eax, eax
jbe 0x449ae3
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x449ae3
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 0x449a8e
xor esi, esi
jmp 0x449a94
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x449abf
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.0044baa0
add esi, eax
push esi
mov ebx, esi
call fcn.0044baa0
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x449aa0
pop ebp
test edi, edi
pop edi
jne 0x449ae3
test ebx, ebx
je 0x449ae3
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.0044e110
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x449c25
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 0x449d3d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x449d3d
mov eax, dword [esi + 0x3c]
push eax
call fcn.0045e879
mov esi, eax
test esi, esi
je 0x449d3d
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 0x449d3d
mov ecx, esi
call fcn.00449b90
cmp edi, eax
jge 0x449d3d
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 0x449cc3
mov dword [esp + 0x34], 1
jmp 0x449d1e
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x449d3d
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.00449170
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 0x45f21d
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x45f255
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.0045d2d4
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0045d2ac
jmp 0x45f261
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x460914
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 0x460956
call fcn.004663cc
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x460956
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x46094d
xor eax, eax
jmp 0x46095e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00460964
pop edi
pop esi
pop ebx
ret 4
Function at 0x4668fc
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 0x46692a
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x466948
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00466862
jmp 0x466948
mov eax, dword [esi + 0x14]
test eax, eax
je 0x466948
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00466862
test edi, edi
mov eax, edi
jne 0x466932
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x402c3e
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
xor ecx, ecx
push 8
mov eax, ecx
pop edx
test al, 1
je 0x402c52
shr eax, 1
xor eax, 0xedb88320
jmp 0x402c54
shr eax, 1
dec edx
jne 0x402c45
mov dword [ecx*4 + 0x4141c0], eax
mov dword [ecx*4 + 0x4161c0], eax
inc ecx
cmp ecx, 0x100
jb 0x402c40
push ebx
push esi
push edi
mov ecx, 0x4145c0
mov edi, 0x101
mov eax, dword [ecx - 0x400]
push 7
mov edx, ecx
pop esi
movzx ebx, al
shr eax, 8
xor eax, dword [ebx*4 + 0x4141c0]
mov dword [edx], eax
add edx, 0x400
dec esi
jne 0x402c86
add ecx, 4
dec edi
jne 0x402c7b
pop edi
pop esi
pop ebx
ret

Function at 0x402ca8
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x4161c4], 0
jne 0x402cb6
call fcn.00402c3e
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
test esi, esi
jbe 0x402ce3
test cl, 7
je 0x402ce3
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4141c0]
dec esi
inc ecx
jmp 0x402cc4
cmp esi, 8
jb 0x402d76
mov edi, esi
shr edi, 3
push ebx
xor eax, dword [ecx]
sub esi, 8
mov ebx, eax
shr ebx, 0x10
movzx ebx, bl
mov edx, eax
shr edx, 0x18
mov edx, dword [edx*4 + 0x4151c0]
xor edx, dword [ebx*4 + 0x4155c0]
mov ebx, eax
shr ebx, 8
movzx ebx, bl
xor edx, dword [ebx*4 + 0x4159c0]
movzx ebx, byte [ecx + 6]
xor edx, dword [ebx*4 + 0x4145c0]
movzx ebx, byte [ecx + 5]
xor edx, dword [ebx*4 + 0x4149c0]
movzx ebx, byte [ecx + 4]
xor edx, dword [ebx*4 + 0x414dc0]
movzx ebx, byte [ecx + 7]
xor edx, dword [ebx*4 + 0x4141c0]
movzx eax, al
xor edx, dword [eax*4 + 0x415dc0]
add ecx, 8
dec edi
mov eax, edx
jne 0x402cf2
pop ebx
jmp 0x402d76
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4141c0]
dec esi
inc ecx
test esi, esi
ja 0x402d62
pop edi
pop esi
ret 0xc

Function at 0x40323e
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00401200
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x4032d0
push esi
push edi
mov edi, 0x400
push edi
lea eax, [ebp - 0x800]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004068a7
lea eax, [ebp - 0x800]
push eax
call fcn.004098ab
mov esi, eax
lea eax, [ebp - 0x800]
push eax
call fcn.00407184
test al, al
jne 0x4032ac
lea eax, [ebp - 0x1000]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x1000]
push eax
call fcn.004098ab
lea esi, [esi + eax + 1]
mov eax, 0x104
pop edi
cmp esi, eax
pop esi
jbe 0x4032d0
push eax
push 0xaf
call fcn.00408b90
push eax
push 0x4122dc
call fcn.0040a7a9
add esp, 0xc
leave
ret 8
Function at 0x404af9
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30c8
call fcn.00401200
push ebx
push esi
push edi
lea ecx, [ebp - 0x30c8]
call fcn.00403676
xor edi, edi
push edi
lea eax, [ebp - 0x30c8]
push eax
push dword [ebp + 8]
push edi
call fcn.0040612c
test al, al
je 0x404c9e
cmp word [ebp - 0x2448], di
je 0x404c9e
lea eax, [ebp - 0x2448]
push eax
lea eax, [ebp - 0x2cc8]
push eax
call fcn.004069ab
push eax
call fcn.0040db59
test eax, eax
je 0x404c9e
lea eax, [ebp - 0x2448]
push eax
push dword [ebp + 8]
call fcn.004069ab
push eax
call fcn.0040db59
test eax, eax
jne 0x404c9e
mov word [ebp - 0x800], ax
xor ebx, ebx
mov esi, 0x400
cmp word [ebp - 0x800], di
jne 0x404bef
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x800]
push eax
call fcn.0040d222
push ebx
push str.rtmp_d
push esi
lea eax, [ebp - 0x800]
push eax
call fcn.004069ab
push eax
call fcn.00409b49
add esp, 0x10
lea eax, [ebp - 0x800]
push eax
push edi
call fcn.00405859
test al, al
je 0x404bd7
xor eax, eax
mov word [ebp - 0x800], ax
add ebx, 0x7b
cmp ebx, 0x2710
jl 0x404b88
cmp word [ebp - 0x800], di
je 0x404c9e
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x1000]
push eax
call fcn.0040d222
lea eax, [ebp - 0x2cc8]
push eax
call fcn.004069ab
push eax
lea eax, [ebp - 0x1000]
push eax
call fcn.004069ab
push eax
call fcn.004098d5
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
lea eax, [ebp - 0x800]
push eax
lea eax, [ebp - 0x1000]
push eax
call esi
test eax, eax
je 0x404c9e
lea ecx, [ebp - 0x1c28]
call fcn.00404f1e
push dword [ebp + 8]
xor bl, bl
push edi
call fcn.00405859
test al, al
jne 0x404c65
push 9
push dword [ebp + 8]
lea ecx, [ebp - 0x1c28]
push edi
call fcn.004052a2
mov bl, al
lea eax, [ebp - 0x1000]
push eax
lea eax, [ebp - 0x800]
push eax
call esi
test bl, bl
je 0x404c8f
lea ecx, [ebp - 0x1c28]
call fcn.00404f90
lea ecx, [ebp - 0x1c28]
call fcn.00405015
lea ecx, [ebp - 0x1c28]
call fcn.0040510a
mov al, 1
jmp 0x404ca0
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40512d
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esi + 0xc20], ebx
cmp byte [esi + 0x1c], bl
jne 0x40514d
test byte [ebp + 0x10], 4
jne 0x40514d
xor al, al
jmp 0x40514f
mov al, 1
mov ecx, dword [ebp + 0x10]
shr ecx, 1
and cl, 1
movzx edi, cl
neg edi
sbb edi, edi
and edi, 0xc0000000
add edi, 0x80000000
test byte [ebp + 0x10], 1
je 0x405176
or edi, 0x40000000
mov dword [ebp + 0x10], 1
cmp al, bl
je 0x405188
mov dword [ebp + 0x10], 3
xor eax, eax
cmp byte [esi + 0x15], bl
setne al
dec eax
and eax, 0x8000000
mov dword [ebp - 4], eax
call fcn.004061fb
test eax, eax
je 0x4051c2
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4051c2
cmp word [eax], bx
je 0x4051c2
push ebx
push dword [ebp - 4]
push 3
push ebx
push dword [ebp + 0x10]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4051d6
push ebx
push dword [ebp - 4]
push 3
push ebx
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4051f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4051f2
mov dword [esi + 0xc20], 1
cmp edi, 0xffffffff
setne byte [ebp + 0x13]
mov byte [esi + 0x12], bl
mov dword [esi + 0xc], ebx
mov byte [esi + 0x10], bl
cmp byte [ebp + 0x13], bl
je 0x40526a
mov dword [esi + 4], edi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x40522b
push edi
call fcn.004098ab
lea eax, [eax + eax + 2]
push eax
push edi
lea eax, [esi + 0x41e]
push eax
call fcn.004095da
jmp 0x405234
xor eax, eax
mov word [esi + 0x41e], ax
cmp dword [ebp + 8], ebx
je 0x405251
push dword [ebp + 8]
call fcn.00409625
inc eax
push eax
push dword [ebp + 8]
lea eax, [esi + 0x1d]
push eax
call fcn.004095da
jmp 0x405260
push 0x1000000
lea eax, [esi + 0x1d]
push eax
push edi
call fcn.0040d921
push dword [esi + 4]
mov ecx, esi
call fcn.00404f69
mov al, byte [ebp + 0x13]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x405388
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0xc], 1
mov esi, 0x4e20
jne 0x4053ae
cmp dword [ebp + 0xc], esi
jbe 0x4053a3
mov dword [ebp + 0xc], esi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4053fe
mov ecx, edi
call fcn.004050e7
test al, al
je 0x4053e4
cmp dword [ebp + 0xc], esi
jbe 0x4053e4
push esi
push dword [ebp + 8]
mov ecx, edi
call fcn.00405388
jmp 0x405401
cmp dword [edi + 0xc], 1
jne 0x4053f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x4053f9
xor eax, eax
jmp 0x405401
or eax, 0xffffffff
jmp 0x405401
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8
Function at 0x405659
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
push esi
mov esi, ecx
je 0x405769
mov eax, dword [esi + 0xc]
test eax, eax
je 0x405686
dec eax
je 0x40567b
dec eax
jne 0x405686
push 0xfffffffffffffff4
jmp 0x40567d
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [esi + 0xc], edi
je 0x4056d5
cmp dword [ebp + 0xc], edi
jbe 0x4056f0
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov eax, 0x4000
cmp ecx, eax
jae 0x4056ad
mov eax, ecx
push 0
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
je 0x4056f0
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x40569d
jmp 0x4056ec
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
test al, al
jne 0x405763
cmp byte [esi + 0x14], 0
je 0x405763
cmp dword [esi + 0xc], 0
jne 0x405763
push 0
lea eax, [esi + 0x41e]
push eax
lea eax, [esi + 0x1d]
mov edi, 0x416e7c
push eax
mov ecx, edi
call fcn.004033b3
test al, al
je 0x40574d
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x40568e
test eax, eax
jbe 0x40568e
push 0
mov ecx, esi
call fcn.00405045
mov ecx, dword [ebp - 4]
xor edi, edi
sub eax, ecx
sbb edx, edi
push edx
push eax
mov ecx, esi
call fcn.004055ba
jmp 0x40568e
lea eax, [esi + 0x41e]
push eax
lea eax, [esi + 0x1d]
push eax
push 0
push 0
mov ecx, edi
call fcn.0040363d
pop edi
mov byte [esi + 8], 1
pop ebx
pop esi
leave
ret 8

Function at 0x405859
Capabilities:
Check if file exists
Get file attributes

Disassembly:
call fcn.004061fb
test eax, eax
je 0x405883
mov eax, dword [esp + 8]
test eax, eax
je 0x405883
cmp word [eax], 0
je 0x405883
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
jmp 0x4058a0
cmp dword [esp + 4], 0
je 0x40589e
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40589e
xor eax, eax
inc eax
jmp 0x4058a0
xor eax, eax
ret 8

Function at 0x4058ce
Capabilities:
Get file attributes

Disassembly:
call fcn.004061fb
test eax, eax
je 0x4058ee
mov eax, dword [esp + 8]
test eax, eax
je 0x4058ee
cmp word [eax], 0
je 0x4058ee
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x4058f8
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
ret 8

Function at 0x4058fb
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
call fcn.004061fb
test eax, eax
je 0x405920
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x405920
cmp word [eax], 0
je 0x405920
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x405932
cmp dword [ebp + 8], 0
je 0x405939
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
setne al
jmp 0x40593b
xor al, al
pop ebp
ret 0xc
Function at 0x405971
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
call fcn.004061fb
mov esi, dword [ebp + 0xc]
xor ebx, ebx
test eax, eax
je 0x405997
cmp esi, ebx
je 0x405997
cmp word [esi], bx
je 0x405997
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x4059a6
cmp dword [ebp + 8], ebx
je 0x4059d4
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp eax, ebx
je 0x4059bf
cmp byte [ebp + 0x10], bl
je 0x4059bb
push dword [ebp + 0x14]
push esi
push dword [ebp + 8]
call fcn.004058fb
xor eax, eax
jmp 0x4059d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4059d4
cmp eax, 3
je 0x4059d4
xor eax, eax
inc eax
jmp 0x4059d7
push 2
pop eax
pop esi
pop ebx
pop ebp
ret 0x10