joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001f4df
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
movzx eax, byte [ebp + 8]
test eax, eax
je 0x1001f528
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xc], eax
lea eax, [ebp + 0x14]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
test eax, eax
je 0x1001f51c
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
dec eax
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jmp 0x1001f526
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
jmp 0x1001f546
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x10]
mov dword [ebp - 0x18], eax
push 1
push dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
push dword [eax]
call fcn.1000f97d
add esp, 0xc
mov esp, ebp
pop ebp
ret

Function at 0x1001f55f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push esi
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x1001f699
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
lea eax, [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
test eax, eax
je 0x1001f677
mov byte [ebp - 1], 0
mov dword [ebp - 0x1c], 0x1b73
cmp dword [ebp - 0x1c], 0xadc
jge 0x1001f665
xor eax, eax
inc eax
je 0x1001f665
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
mov ecx, 0x106572f0
call fcn.10028516
mov ecx, eax
call fcn.10028516
cmp dword [ebp - 0x10], 0
jne 0x1001f5d7
cmp dword [ebp - 8], 0
jne 0x1001f5d7
jmp 0x1001f665
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x10]
shr eax, 1
cmp dword [ebp - 8], eax
jbe 0x1001f5ec
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
jmp 0x1001f5f2
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x30], 1
and dword [ebp - 0x2c], 0
and dword [ebp - 0xc], 0
jmp 0x1001f60a
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
jae 0x1001f644
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0xc]
xor ecx, ecx
push ecx
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
call fcn.10053050
mov ecx, eax
mov esi, edx
mov eax, dword [ebp - 0xc]
inc eax
cdq
push edx
push eax
push esi
push ecx
call fcn.10066a70
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
jmp 0x1001f603
push fcn.1002cce1
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
mov ecx, 0x10657238
call fcn.10028a3a
mov ecx, eax
call fcn.1002891c
jmp 0x1001f5a4
movzx eax, byte [ebp - 1]
test eax, eax
je 0x1001f675
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
jmp 0x1001f697
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax]
test eax, eax
je 0x1001f697
push 0
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
jmp 0x1001f6b2
push 1
push 0x527e
push 0x1254
push 0x7005
call fcn.10010582
add esp, 0x10
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10020821
Capabilities:
Get file system object information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
movzx eax, byte [ebp + 0x20]
test eax, eax
je 0x100208a2
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x14]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax]
test eax, eax
je 0x10020898
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
mov dword [eax], 0
jmp 0x10020879
mov eax, dword [ebp - 4]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 4
jge 0x10020896
mov eax, dword [ebp - 4]
push dword [eax]
mov ecx, dword [ebp - 0x20]
call fcn.10028ca3
mov dword [eax], 0x8d239be9
jmp 0x1002086e
jmp 0x100208a0
push 0
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
jmp 0x10020921
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x2c], eax
lea eax, [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
test eax, eax
je 0x100208d9
push 0x391
push 0xfa2
push 0
push 0x36d
push 0
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
jmp 0x10020921
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 8]
mov dword [eax], 0
jmp 0x10020907
mov eax, dword [ebp - 8]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
cmp dword [eax], 2
jge 0x10020921
mov eax, dword [ebp - 8]
push dword [eax]
mov ecx, dword [ebp - 0x38]
call fcn.10028ca3
or dword [eax], 0xffffffff
jmp 0x100208fc
mov esp, ebp
pop ebp
ret
Function at 0x1003632f
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax]
test eax, eax
je 0x1003635b
push 0
push 0x1ee1
push 0
push 0
push 0xcff
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esp, ebp
pop ebp
ret
Function at 0x10042124
Capabilities:
Create thread

Disassembly:
xor eax, eax
push eax
push 0x1ee1
push eax
push eax
push 0xcff
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
ret
Function at 0x10062325
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1006b758]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.10053298
mov dword [ebp - 0x14], eax
cmp dword [0x10658360], esi
jne 0x10062418
push 0x800
push esi
push 0x1000897c
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x100623a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x100624f8
push esi
push esi
push 0x1000897c
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x100624f8
push 0x10008994
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x100624f8
push eax
call ebx
push 0x100089a0
push edi
mov dword [0x10658360], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x100089b0
push edi
mov dword [0x10658364], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x100089c4
push edi
mov dword [0x10658368], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x10658370], eax
test eax, eax
je 0x10062415
push 0x100089e0
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x1065836c], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1006243d
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10062430
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x10062452
push 4
pop eax
jmp 0x100624fa
cmp dword [ebp - 0x14], esi
je 0x10062452
push dword [0x10658360]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x10062437
mov eax, dword [0x1065836c]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x100624b0
cmp dword [0x10658370], edi
je 0x100624b0
push eax
call ebx
push dword [0x10658370]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x100624b0
test eax, eax
je 0x100624b0
call ecx
test eax, eax
je 0x100624a5
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x100624a5
test byte [ebp - 8], 1
jne 0x100624b0
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x100624e0
mov eax, dword [0x10658364]
cmp eax, edi
je 0x100624dd
push eax
call ebx
test eax, eax
je 0x100624dd
call eax
mov esi, eax
test esi, esi
je 0x100624dd
mov eax, dword [0x10658368]
cmp eax, edi
je 0x100624dd
push eax
call ebx
test eax, eax
je 0x100624dd
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x10658360]
call ebx
test eax, eax
je 0x100624f8
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x100624fa
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005099d
mov esp, ebp
pop ebp
ret
Function at 0x401870
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov eax, dword [ebx + 0x14]
push edi
mov edi, ecx
mov esi, dword [edi + 0xbc]
mov ecx, dword [edi + 0x1c]
add esi, edi
mov dword [esi + 8], eax
mov eax, dword [ebx + 0x18]
mov dword [esi + 0xc], eax
mov eax, 0x100
mov dword [esi + 0x10], 1
test word [edi + 0x94], ax
jne 0x4018ae
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov eax, dword [edi + 0x78]
test al, 4
je 0x4018c2
test byte [ecx + 0x3a], 1
je 0x4018e2
and eax, 0xfffffffb
mov dword [edi + 0x78], eax
or dword [esi + 0x10], 0x200
test byte [ecx + 0x3a], 2
je 0x4018e2
mov eax, dword [ecx + 0x46]
or dword [esi + 0x10], 0x400
mov dword [esi + 0x14], eax
test dword [edi + 0x78], 0x400
je 0x4018f2
or dword [esi + 0x10], 0x4000
test byte [ecx + 0x3a], 4
je 0x4018ff
or dword [esi + 0x10], 0x100
test byte [ebx + 6], 2
mov edx, 1
je 0x401927
or dword [esi + 0x10], 0x80
mov word [esi + 0x20], dx
cmp word [edi + 0x18], 3
jne 0x40192c
mov eax, 0x2000
or word [edi + 0x7c], ax
jmp 0x40192c
or word [esi + 0x20], 0x20
mov eax, dword [ecx + 0x3c]
mov dword [esi + 0x18], eax
cmp word [esi + 0x18], 0xd
mov eax, dword [ecx + 0x40]
mov dword [esi + 0x1c], eax
jne 0x401993
movsx edx, word [ecx]
mov ecx, dword [0x4b39ac]
cmp edx, dword [ecx + 0x194]
jge 0x401989
mov eax, dword [ecx + 0x198]
movzx eax, word [eax + edx*2]
mov dword [ecx + 0x1a0], eax
mov eax, dword [0x4b39ac]
mov ecx, dword [eax + 0x1a0]
mov eax, dword [eax + 0x19c]
mov edx, dword [eax + ecx*4]
test edx, edx
je 0x401989
mov ecx, dword [edx + 0x24]
test ecx, ecx
je 0x401989
mov edx, dword [edx + 0xc]
call fcn.00434af0
jmp 0x40198b
xor eax, eax
mov dword [esi + 0x1c], eax
mov edx, 1
cmp dword [edi + 0xcc], 0
jne 0x4019a5
or word [esi + 0x20], 2
or dword [esi + 0x10], 8
mov cx, word [esi + 0x10]
pop edi
mov word [esi + 0x22], cx
pop esi
mov eax, edx
pop ebx
pop ebp
ret

Function at 0x4032d0
Capabilities:
Get geographical location

Disassembly:
push esi
mov esi, ecx
xor eax, eax
mov word [esi], ax
test edx, edx
je 0x40335e
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push eax
push eax
movzx ebx, dx
push 0x59
push ebx
call edi
cmp eax, 0x63
jge 0x40335c
push eax
push esi
push 0x59
push ebx
call edi
lea edi, [esi - 2]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x403301
mov eax, dword [0x491d68]
mov dword [edi], eax
mov edi, esi
lea ecx, [edi + 2]
lea esp, [esp]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x403320
push 0
push 0
push 0x5a
sub edi, ecx
push ebx
sar edi, 1
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ecx, 0x63
sub ecx, edi
cmp eax, ecx
jge 0x403357
push eax
lea eax, [esi + edi*2]
push eax
push 0x5a
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x40335c
xor eax, eax
mov word [esi], ax
pop edi
pop ebx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x403361
sub esi, ecx
sar esi, 1
mov eax, esi
pop esi
ret
Function at 0x404a00
Capabilities:
Check os version
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48a580
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x4ae008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x128]
push eax
mov dword [ebp - 0x128], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x404ac3
cmp dword [ebp - 0x118], 2
jne 0x404ac3
mov eax, dword [ebp - 0x124]
cmp eax, 6
ja 0x404a6b
jne 0x404ac3
cmp dword [ebp - 0x120], 1
jbe 0x404ac3
push 0x491d6c
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x404ac3
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ImmDisableIME
push esi
call ebx
mov edi, eax
test edi, edi
je 0x404abc
push str.ImmIsIME
push esi
call ebx
mov ebx, eax
test ebx, ebx
je 0x404ab8
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
test eax, eax
je 0x404ab8
push eax
call ebx
test eax, eax
je 0x404abc
push 0xffffffffffffffff
call edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0046d146
mov esp, ebp
pop ebp
ret
Function at 0x407760
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
lea edx, [ecx + 2]
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407770
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 4]
push eax
call fcn.0046d9a4
mov ebx, eax
add esp, 8
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x407830
mov ecx, ebx
sub ecx, esi
mov edi, edi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x4077a0
push 0x5c
push ebx
call fcn.0046f23f
add esp, 8
test eax, eax
je 0x4077c4
xor ecx, ecx
mov word [eax + 2], cx
cmp word [ebx], 0x5c
jne 0x4077ed
cmp word [ebx + 2], 0x5c
jne 0x4077ed
lea eax, [ebx + 4]
push 0x5c
push eax
call fcn.0046f2e5
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x407810
push 0x5c
lea eax, [ebx + 2]
push eax
jmp 0x407806
cmp word [ebx + 2], 0x3a
jne 0x407803
cmp word [ebx + 4], 0x5c
jne 0x407803
push 0x5c
lea eax, [ebx + 6]
push eax
jmp 0x407806
push 0x5c
push ebx
call fcn.0046f2e5
add esp, 8
mov ebx, eax
push 2
push 0x104
call fcn.0046d9a4
mov esi, eax
add esp, 8
test esi, esi
jne 0x40783a
push dword [ebp - 4]
call fcn.0046d1e7
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
test ebx, ebx
je 0x4078a7
mov eax, ebx
sub eax, ecx
sar eax, 1
push eax
push ecx
push esi
call fcn.0046f393
push esi
call fcn.0046f3d6
add esp, 0x10
test eax, eax
je 0x407883
push esi
call fcn.0046f4f3
add esp, 4
test eax, eax
je 0x407870
mov edi, 1
jmp 0x407883
push esi
call fcn.0046f3d6
add esp, 4
test eax, eax
mov eax, 1
cmovne edi, eax
lea eax, [ebx + 2]
push 0x5c
push eax
mov dword [ebp - 8], ebx
call fcn.0046f2e5
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40791b
mov ecx, dword [ebp - 8]
test edi, edi
je 0x407841
jmp 0x40791b
mov edx, esi
sub edx, dword [ebp - 4]
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4078b0
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4078c4
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x4078e7
cmp word [esi + ecx*2 - 2], 0x5c
jne 0x4078e7
xor eax, eax
mov word [esi + ecx*2 - 2], ax
push esi
call fcn.0046f3d6
add esp, 4
test eax, eax
je 0x40791b
push esi
call fcn.0046f4f3
add esp, 4
test eax, eax
je 0x407908
mov edi, 1
jmp 0x40791b
push esi
call fcn.0046f3d6
add esp, 4
mov ecx, 1
test eax, eax
cmovne edi, ecx
push esi
call fcn.0046d1e7
push dword [ebp - 4]
call fcn.0046d1e7
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x407940
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40796f
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x26
neg eax
sbb eax, eax
add eax, 0x40000002
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
cmp ecx, 0xffffffff
jne 0x407980
mov eax, 0x40000001
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp ecx, dword [ebp + 8]
mov edx, 0x40000002
cmovne eax, edx
mov esp, ebp
pop ebp
ret
Function at 0x4079a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4079d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x70
neg eax
sbb eax, eax
add eax, 0x40000004
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp dword [ebp - 4], esi
mov ecx, 0x40000004
cmovne eax, ecx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x407a30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, edx
push 1
push 0x8000
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], ecx
xor esi, esi
call fcn.0046d9a4
add esp, 8
mov dword [ebp - 4], eax
test edi, edi
je 0x407af3
lea ecx, [ecx]
push 0
mov ebx, 0x8000
cmp edi, ebx
cmovb ebx, edi
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
push dword [ebp - 0xc]
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407aeb
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x407af5
cmp eax, ebx
jne 0x407af5
mov ecx, ebx
shr ecx, 2
mov edx, edi
test ecx, ecx
je 0x407ab1
lea esp, [esp]
mov eax, esi
shr eax, 0x1f
add edx, 4
lea esi, [eax + esi*2]
add esi, dword [edx - 4]
dec ecx
jne 0x407aa0
mov eax, ebx
and eax, 3
mov dword [ebp - 0x14], eax
mov edi, 0
jbe 0x407ad8
mov ebx, eax
movzx ecx, byte [edi + edx]
mov eax, esi
shr eax, 0x1f
add ecx, eax
inc edi
lea esi, [ecx + esi*2]
cmp edi, ebx
jb 0x407ac2
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 8]
sub edi, ebx
mov dword [ebp - 8], edi
jne 0x407a60
mov edi, dword [ebp - 4]
jmp 0x407af5
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407af5
mov edi, eax
push 0x8000
push 0
push edi
call fcn.00471f40
push edi
call fcn.0046d1e7
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407b20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
push 0
push 0
mov ebx, ecx
push 0x186a0
push ebx
mov dword [ebp - 8], 0
call esi
push 1
push 0
push 0
push ebx
call esi
push 2
push 0
push 0
push ebx
mov edi, eax
call esi
push 0
push 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
mov esi, eax
call edi
cmp esi, 0x155cc0
jge 0x407b94
push 1
push 0
push 0
push ebx
call edi
push 2
push 0
push 0
push ebx
mov esi, eax
call edi
push 0
push 0
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x407b99
mov edi, 0x155cc0
lea eax, [edi + 8]
push 1
push eax
call fcn.0046d9a4
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
je 0x407c25
push 0
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407bc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
test edi, edi
je 0x407c12
cmp dword [esi], 0x77777777
jne 0x407be4
cmp dword [ecx + eax + 4], 0x12478749
je 0x407bfd
inc eax
inc esi
cmp eax, edi
jb 0x407bd2
push ecx
call fcn.0046d1e7
mov eax, dword [ebp - 8]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
sub esi, ecx
add esi, 0x186a0
mov dword [0x4b3864], esi
mov dword [ebp - 8], 1
push ecx
call fcn.0046d1e7
mov eax, dword [ebp - 8]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408110
Capabilities:
Create directory
Get common file path

Disassembly:
push esi
mov esi, dword [0x4b385c]
push edi
push 2
push 0x104
call fcn.0046d9a4
mov edi, eax
add esp, 8
test edi, edi
je 0x408157
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
push 0
push 0x491db4
push edi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push edi
call fcn.0046d1e7
mov esi, dword [0x4b385c]
add esp, 4
cmp word [esi], 0
je 0x408188
push esi
call fcn.0046ec63
add esp, 4
push 0
push dword [0x4b385c]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x408188
mov ecx, dword [0x4b385c]
call fcn.00424f40
pop edi
xor eax, eax
pop esi
ret
pop edi
mov eax, 0x67
pop esi
ret
Function at 0x408250
Capabilities:
Set current directory

Disassembly:
mov eax, dword [0x4b3b40]
test eax, eax
je 0x408283
cmp dword [0x4b3b3c], 0
je 0x408272
push eax
mov ecx, 0x4b3c74
call fcn.00461e20
mov eax, dword [0x4b3b40]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4b3b40], 0
mov eax, dword [0x4b3868]
test eax, eax
je 0x4082c0
push 0x5c
push eax
call fcn.0046f23f
add esp, 8
test eax, eax
je 0x4082c0
mov edx, dword [0x4b3868]
mov ecx, eax
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jae 0x4082b4
xor ecx, ecx
mov word [eax + 2], cx
jmp 0x4082b9
xor ecx, ecx
mov word [eax], cx
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push edi
mov edi, dword [0x4b3860]
test edi, edi
je 0x4083ad
cmp word [edi], 0
je 0x4083a4
xor esi, esi
push edi
call fcn.0046ec63
add esp, 4
test eax, eax
je 0x408309
call fcn.0046f6c4
cmp dword [eax], 2
je 0x408309
push 0x3e8
call ebx
inc esi
cmp esi, 0xa
jl 0x4082e3
jmp 0x408375
mov ecx, edi
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408310
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 1]
push eax
call fcn.0046d9a4
mov esi, eax
add esp, 8
test esi, esi
je 0x408375
mov edx, esi
mov ecx, edi
sub edx, edi
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x408340
push 0x5c
push esi
call fcn.0046f23f
add esp, 8
test eax, eax
je 0x40836c
xor ecx, ecx
push esi
mov word [eax], cx
call fcn.0046f718
add esp, 4
push esi
call fcn.0046d1e7
add esp, 4
mov ecx, edi
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408380
sub ecx, edx
sar ecx, 1
lea edi, [edi + ecx*2]
add edi, 2
cmp word [edi], ax
jne 0x4082e1
mov edi, dword [0x4b3860]
push edi
call fcn.0046d1e7
add esp, 4
mov edx, dword [0x4b385c]
test edx, edx
je 0x40841a
xor esi, esi
lea esp, [esp]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4083c5
sub ecx, edi
sar ecx, 1
cmp ecx, 3
jle 0x4083e8
cmp word [edx + ecx*2 - 2], 0x5c
jne 0x4083e8
xor eax, eax
mov word [edx + ecx*2 - 2], ax
push edx
call fcn.0046f718
add esp, 4
test eax, eax
je 0x408414
call fcn.0046f6c4
cmp dword [eax], 2
je 0x408414
push 0x3e8
call ebx
inc esi
cmp esi, 0xa
jge 0x408414
mov edx, dword [0x4b385c]
jmp 0x4083c0
mov edx, dword [0x4b385c]
push edx
call fcn.0046d1e7
push dword [0x4b3868]
mov dword [0x4b385c], 0
call fcn.0046d1e7
add esp, 8
mov dword [0x4b3868], 0
pop edi
pop esi
pop ebx
ret