joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4280dc
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffbc4
mov esi, edx
mov edi, eax
xor ebx, ebx
test esi, esi
jne 0x428218
xor esi, esi
push 0x20a
lea eax, [esp + 0x14]
push eax
push esi
push edi
call sub.advapi32.dll_RegEnumKeyW
mov ebx, eax
test ebx, ebx
je 0x428120
cmp ebx, 0x103
jne 0x428379
xor ebx, ebx
jmp 0x428379
cmp word [esp + 0x10], 0x2e
je 0x4281fe
lea eax, [esp + 0x10]
call fcn.0041a704
mov dword [esp + 8], eax
mov edx, 0x428388
lea eax, [esp + 0x10]
call fcn.0041a728
mov edx, 0x4283b0
lea eax, [esp + 0x21a]
call fcn.0041a714
push esp
lea eax, [esp + 0x14]
push eax
push edi
call sub.advapi32.dll_RegOpenKeyW
mov ebx, eax
test ebx, ebx
jne 0x4281ab
mov eax, dword [esp + 8]
mov word [esp + eax*2 + 0x10], 0
mov dword [esp + 4], 0x20a
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x21e]
push eax
lea eax, [esp + 0x14]
push eax
push 0
push 0x4283f0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
mov ebx, eax
mov eax, dword [esp]
push eax
call sub.advapi32.dll_RegCloseKey_1
test ebx, ebx
jne 0x4281fe
mov eax, dword [esp + 4]
shr eax, 1
mov word [esp + eax*2 + 0x218], 0
lea eax, [esp + 0x10]
mov dword [esp + 0x424], eax
mov byte [esp + 0x428], 0xa
lea eax, [esp + 0x21a]
mov dword [esp + 0x42c], eax
mov byte [esp + 0x430], 0xa
lea edx, [esp + 0x424]
mov eax, 0x4283f4
mov ecx, 1
call fcn.0041eb58
mov eax, dword [0x436b90]
cmp dword [eax], 0
je 0x428212
mov ebp, 1
jmp 0x42837b
inc esi
jmp 0x4280f6
cmp word [esi], 0x2e
jne 0x42824f
push 0
mov dword [esp + 0x438], esi
mov byte [esp + 0x43c], 0xa
lea ecx, [esp + 0x438]
mov edx, 1
mov eax, 0x428410
call fcn.0042f45c
mov ebp, 0x7b
jmp 0x42837b
xor edx, edx
mov eax, esi
call fcn.0042fb90
mov esi, eax
mov dx, 0x20
mov eax, esi
call fcn.0041a6bc
test eax, eax
je 0x42826e
mov word [eax], 0
push 0
mov dword [esp + 0x438], esi
mov byte [esp + 0x43c], 0xa
lea ecx, [esp + 0x438]
mov edx, 0x428494
lea eax, [esp + 0x14]
call fcn.0041a7c0
push esp
lea eax, [esp + 0x14]
push eax
push edi
call sub.advapi32.dll_RegOpenKeyW
mov ebx, eax
test ebx, ebx
je 0x4282d4
push 0
mov dword [esp + 0x438], esi
mov byte [esp + 0x43c], 0xa
lea ecx, [esp + 0x438]
mov edx, 1
mov eax, 0x428410
call fcn.0042f45c
mov ebp, ebx
jmp 0x42837b
mov dword [esp + 4], 0x20a
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x21e]
push eax
lea eax, [esp + 0x14]
push eax
push 0
push 0x4283f0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
mov ebx, eax
test ebx, ebx
jne 0x428352
mov eax, dword [esp + 4]
shr eax, 1
mov word [esp + eax*2 + 0x218], 0
mov dword [esp + 0x424], esi
mov byte [esp + 0x428], 0xa
lea eax, [esp + 0x21a]
mov dword [esp + 0x42c], eax
mov byte [esp + 0x430], 0xa
lea edx, [esp + 0x424]
mov eax, 0x4283f4
mov ecx, 1
call fcn.0041eb58
jmp 0x428379
push 0
mov dword [esp + 0x438], esi
mov byte [esp + 0x43c], 0xa
lea ecx, [esp + 0x438]
mov edx, 1
mov eax, 0x428410
call fcn.0042f45c
mov ebp, ebx
mov eax, ebp
add esp, 0x43c
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4284c0
Capabilities:
Delete registry key
Persist via default file association registry key
Set registry value

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffdc4
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
push 0
mov eax, dword [esp + 8]
mov dword [esp + 0x228], eax
mov byte [esp + 0x22c], 0xa
lea ecx, [esp + 0x228]
mov edx, 0x428704
lea eax, [esp + 0x1c]
call fcn.0041a7c0
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 8]
push eax
call sub.advapi32.dll_RegOpenKeyW
mov edi, eax
test edi, edi
je 0x4285fb
cmp dword [esp + 8], 0
je 0x42852e
mov eax, dword [esp + 8]
cmp word [eax], 0
jne 0x428562
push 0
mov eax, dword [esp + 8]
mov dword [esp + 0x228], eax
mov byte [esp + 0x22c], 0xa
lea ecx, [esp + 0x228]
mov edx, 1
mov eax, 0x42873c
call fcn.0042f45c
mov dword [esp + 0xc], edi
jmp 0x4286f4
lea ebx, [esp + 0x18]
jmp 0x42856b
add ebx, 2
movzx esi, word [ebx]
test si, si
je 0x428579
cmp si, 0x5c
jne 0x428568
movzx ebp, word [ebx]
mov word [ebx], 0
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
push 0
push 0x2000000
push 0
push 0
push 0
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x20]
push eax
call sub.advapi32.dll_RegCreateKeyExW
mov edi, eax
test edi, edi
je 0x4285e1
push 0
mov eax, dword [esp + 8]
mov dword [esp + 0x228], eax
mov byte [esp + 0x22c], 0xa
lea ecx, [esp + 0x228]
mov edx, 1
mov eax, 0x42873c
call fcn.0042f45c
mov dword [esp + 0xc], edi
jmp 0x4286f4
test bp, bp
je 0x4285fb
mov word [ebx], bp
add ebx, 2
mov eax, dword [esp + 0x10]
push eax
call sub.advapi32.dll_RegCloseKey_1
jmp 0x42856b
cmp dword [esp + 8], 0
je 0x42860c
mov eax, dword [esp + 8]
cmp word [eax], 0
jne 0x428652
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegDeleteKeyW
mov edi, eax
test edi, edi
je 0x4286e6
push 0
mov eax, dword [esp + 8]
mov dword [esp + 0x228], eax
mov byte [esp + 0x22c], 0xa
lea ecx, [esp + 0x228]
mov edx, 1
mov eax, 0x42873c
call fcn.0042f45c
jmp 0x4286e6
mov eax, dword [esp + 8]
call fcn.0041a704
inc eax
add eax, eax
push eax
mov eax, dword [esp + 0xc]
push eax
push 2
push 0
push 0x4287c0
mov eax, dword [esp + 0x24]
push eax
call sub.advapi32.dll_RegSetValueExW
mov edi, eax
test edi, edi
jne 0x4286bb
mov eax, dword [esp + 4]
mov dword [esp + 0x22c], eax
mov byte [esp + 0x230], 0xa
mov eax, dword [esp + 8]
mov dword [esp + 0x234], eax
mov byte [esp + 0x238], 0xa
lea edx, [esp + 0x22c]
mov eax, 0x4287c4
mov ecx, 1
call fcn.0041eb58
jmp 0x4286e6
push 0
mov eax, dword [esp + 8]
mov dword [esp + 0x228], eax
mov byte [esp + 0x22c], 0xa
lea ecx, [esp + 0x228]
mov edx, 1
mov eax, 0x4287e0
call fcn.0042f45c
mov eax, dword [esp + 0x10]
push eax
call sub.advapi32.dll_RegCloseKey_1
mov dword [esp + 0xc], edi
mov eax, dword [esp + 0xc]
add esp, 0x23c
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x428af0
Capabilities:
Parse pe header

Disassembly:
push ebx
push esi
add esp, 0xfffffec8
xor esi, esi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call sub.kernel32.dll_CreateFileW_1
mov ebx, eax
test ebx, ebx
je 0x428b8b
lea edx, [esp + 4]
mov ecx, 0x40
mov eax, ebx
call fcn.00415038
cmp word [esp + 4], 0x5a4d
jne 0x428b85
xor ecx, ecx
mov edx, dword [esp + 0x40]
mov eax, ebx
call fcn.00415064
mov edx, esp
mov ecx, 4
mov eax, ebx
call fcn.00415038
cmp dword [esp], 0x4550
jne 0x428b85
lea edx, [esp + 0x44]
mov ecx, 0x14
mov eax, ebx
call fcn.00415038
cmp word [esp + 0x54], 0
jbe 0x428b85
lea edx, [esp + 0x58]
mov ecx, 0xe0
mov eax, ebx
call fcn.00415038
movzx esi, word [esp + 0x9c]
push ebx
call sub.kernel32.dll_CloseHandle_1
mov eax, esi
add esp, 0x138
pop esi
pop ebx
ret

Function at 0x428d14
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov dword [esp], edx
mov edi, eax
mov ebp, dword [0x436ac8]
mov eax, edi
call fcn.00428cf4
inc eax
jne 0x428e28
mov eax, edi
call fcn.00407360
mov dword [esp + 4], eax
mov eax, dword [ebp]
call fcn.004081ec
mov ebx, eax
lea eax, [ebx + 1]
push eax
mov eax, ebp
mov ecx, 1
mov edx, dword [0x41a4c8]
call fcn.00408408
add esp, 4
mov eax, dword [esp + 4]
lea eax, [eax + eax*2]
call fcn.00403f2c
lea esi, [ebx + ebx*2]
mov edx, dword [ebp]
mov dword [edx + esi*8], eax
lea eax, [ebx + ebx*2]
mov edx, dword [ebp]
mov eax, dword [edx + eax*8]
mov edx, edi
call fcn.00415270
mov eax, dword [ebp]
mov edx, dword [esp]
mov dword [eax + esi*8 + 4], edx
mov eax, dword [esp]
push eax
call sub.msvcrt.dll__get_osfhandle
pop ecx
mov edx, dword [ebp]
mov dword [edx + esi*8 + 8], eax
push 2
push 0
push 0
lea eax, [ebx + ebx*2]
mov edx, dword [ebp]
mov eax, dword [edx + eax*8 + 8]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov edx, dword [ebp]
mov dword [edx + esi*8 + 0xc], eax
lea eax, [ebx + ebx*2]
mov edx, dword [ebp]
mov eax, dword [edx + eax*8 + 0xc]
call fcn.00403f2c
mov edx, dword [ebp]
mov dword [edx + esi*8 + 0x10], eax
push 0
push 0
push 0
mov eax, dword [ebp]
mov eax, dword [eax + esi*8 + 8]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [esp + 0xc]
push eax
mov eax, dword [ebp]
mov eax, dword [eax + esi*8 + 0xc]
push eax
mov eax, dword [ebp]
mov eax, dword [eax + esi*8 + 0x10]
push eax
mov eax, dword [ebp]
mov eax, dword [eax + esi*8 + 8]
push eax
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp]
mov edx, dword [eax + esi*8 + 0xc]
mov eax, dword [ebp]
mov eax, dword [eax + esi*8 + 0x10]
call fcn.0041a9dc
mov eax, dword [ebp]
xor edx, edx
mov dword [eax + esi*8 + 0x14], edx
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x42ab90
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda0
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0041a704
mov edi, eax
xor eax, eax
mov ebx, dword [ebp + 8]
jmp 0x42abc2
inc eax
jmp 0x42abbc
add ebx, 2
cmp word [ebx], 0
jne 0x42abb9
cmp word [ebx], 0
jne 0x42abb6
sub ebx, dword [ebp + 8]
sar ebx, 1
jns 0x42abd2
adc ebx, 0
inc ebx
add ebx, edi
mov edx, ebx
add edx, edx
imul edx, eax
mov eax, edx
call fcn.0042e2c0
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 0x10]
jmp 0x42ac1e
mov ecx, edi
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.0041a638
mov eax, edi
add eax, eax
add eax, esi
mov edx, ebx
call fcn.0041a714
mov eax, edi
add eax, eax
add esi, eax
jmp 0x42ac15
add ebx, 2
add esi, 2
cmp word [ebx], 0
jne 0x42ac0f
add esi, 2
cmp word [ebx], 0
jne 0x42abee
mov word [esi], 0
mov eax, dword [ebp - 0x10]
push eax
push 1
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
call fcn.0042b97c
mov ebx, eax
mov eax, dword [ebp - 8]
mov word [eax], 0x2a
mov eax, dword [ebp - 8]
mov word [eax + 2], 0
lea eax, [ebp - 0x260]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_FindFirstFileW_1
mov esi, eax
mov eax, dword [ebp - 8]
mov word [eax], 0
cmp esi, 0xffffffff
je 0x42ad02
lea edx, [ebp - 0x234]
mov eax, dword [ebp - 8]
call fcn.0041a714
test byte [ebp - 0x260], 0x10
je 0x42ace7
mov edx, 0x42ad10
lea eax, [ebp - 0x234]
call fcn.00415300
test eax, eax
je 0x42ace7
mov edx, 0x42ad14
lea eax, [ebp - 0x234]
call fcn.00415300
test eax, eax
je 0x42ace7
mov eax, dword [ebp - 8]
call fcn.0041a808
mov ebx, eax
add ebx, 2
mov word [ebx], 0x5c
add ebx, 2
mov word [ebx], 0
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.0042ab90
mov ebx, eax
lea eax, [ebp - 0x260]
push eax
push esi
call sub.kernel32.dll_FindNextFileW
test eax, eax
jne 0x42ac73
push esi
call sub.kernel32.dll_FindClose_1
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x42cac4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
push eax
call sub.msvcrt.dll__get_osfhandle
pop ecx
mov dword [ebp - 0x10], eax
mov ebx, dword [0x436a54]
push 1
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov dword [ebp - 0xc], eax
push 0
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x436a54]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
jne 0x42cb19
xor eax, eax
jmp 0x42cbbf
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x42cb28
xor eax, eax
jmp 0x42cbbf
mov edi, dword [ebp + 8]
mov edi, dword [edi]
mov esi, edi
test esi, esi
jbe 0x42cb7f
cmp esi, 3
jb 0x42cb79
cmp byte [ebx], 0xa
jne 0x42cb45
lea eax, [ebx + 1]
cmp byte [eax], 0xd
je 0x42cb52
cmp byte [ebx], 0xd
jne 0x42cb79
lea eax, [ebx + 1]
cmp byte [eax], 0xa
jne 0x42cb79
lea eax, [ebx + 2]
mov byte [eax], 0
mov eax, dword [0x436a54]
mov edi, ebx
sub edi, eax
add edi, 2
push 0
push 0
mov eax, dword [ebp - 0xc]
add eax, edi
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_SetFilePointer_1
jmp 0x42cb7f
dec esi
inc ebx
test esi, esi
ja 0x42cb33
mov eax, dword [0x436bcc]
mov eax, dword [eax]
call fcn.00428c44
mov edx, dword [ebp - 8]
push edx
mov edx, dword [ebp - 4]
push edx
push edi
mov edx, dword [0x436a54]
push edx
test eax, eax
setne al
and eax, 0x7f
push eax
mov eax, dword [0x436bcc]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_MultiByteToWideChar_1
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov dword [eax], edx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x42ce24
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x42d094
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [0x44f948], 0x44f930
push 0x44f930
call sub.kernel32.dll_InitializeCriticalSection_1
call fcn.0042df68
push 0xffffffffffffffff
push 0x42cdf4
call sub.kernel32.dll_SetConsoleCtrlHandler
call fcn.00430288
call fcn.0041c3bc
call fcn.0042d374
lea eax, [ebp - 0x20]
call fcn.0041a5d0
push dword [ebp - 0x20]
push 0x42d0b0
lea eax, [ebp - 0x24]
mov edx, dword [0x436bc8]
mov edx, dword [edx]
call fcn.0040765c
push dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00407850
mov eax, dword [ebp - 0x1c]
call fcn.00407604
mov edx, eax
mov eax, dword [0x436b74]
call fcn.0041a714
mov eax, dword [0x436b74]
call fcn.0041a704
mov ecx, eax
mov edx, dword [0x436b74]
mov eax, dword [0x436b74]
call fcn.004204dc
mov eax, 0x44f6ec
xor edx, edx
call fcn.0041e454
call fcn.0042dc20
mov eax, dword [0x436b74]
call fcn.0042d634
mov ebx, eax
cmp word [0x44f6ec], 0x5c
jne 0x42cf4c
cmp word [0x44f6ee], 0x5c
jne 0x42cf4c
cmp byte [0x436982], 0
jne 0x42cf4c
push 0
mov dword [ebp - 0x2c], 0x44f6ec
mov byte [ebp - 0x28], 0xa
lea ecx, [ebp - 0x2c]
mov edx, 1
mov eax, 0x42d0c8
call fcn.0042f45c
push 0x105
push 0x44f6ec
call sub.kernel32.dll_GetWindowsDirectoryW
mov eax, 0x44f6ec
mov dl, 1
call fcn.0041e878
call sub.kernel32.dll_GetConsoleOutputCP_1
mov dword [0x44f90c], eax
push 0x44f8f8
mov eax, dword [0x44f90c]
push eax
call sub.kernel32.dll_GetCPInfo
call fcn.0041aad4
mov eax, 0x20c
call fcn.00403f2c
mov dword [0x44f928], eax
mov eax, 0x20c
call fcn.00403f2c
mov dword [0x44f92c], eax
cmp dword [0x44f928], 0
je 0x42cfbb
cmp dword [0x44f92c], 0
je 0x42cfbb
push 0x104
mov eax, dword [0x44f92c]
push eax
call sub.kernel32.dll_GetConsoleTitleW
mov edx, dword [0x44f92c]
mov eax, dword [0x44f928]
call fcn.0041a714
cmp byte [0x436981], 0
jne 0x42d011
mov eax, 1
call fcn.0041e3f0
test eax, eax
je 0x42d011
cmp word [0x4369a0], 0
je 0x42cffb
lea eax, [ebp - 0x16]
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_GetConsoleScreenBufferInfo
test eax, eax
je 0x42cffb
movzx eax, word [ebp - 0xe]
mov word [0x4369a0], ax
cmp word [0x4369a0], 0
je 0x42d011
movzx eax, word [0x4369a0]
call fcn.00423dd0
test ebx, ebx
jne 0x42d05c
push 0xffffffffffffffff
lea ecx, [ebp - 0x2c]
xor edx, edx
mov eax, 0x42d1b0
call fcn.0042f3e4
cmp byte [0x43699a], 0
je 0x42d042
push 0xffffffffffffffff
lea ecx, [ebp - 0x2c]
xor edx, edx
mov eax, 0x42d270
call fcn.0042f3e4
jmp 0x42d05c
cmp byte [0x436998], 0
je 0x42d05c
push 0xffffffffffffffff
lea ecx, [ebp - 0x2c]
xor edx, edx
mov eax, 0x42d2e4
call fcn.0042f3e4
push 0x42d334
push 0x42d358
call sub.kernel32.dll_GetModuleHandleW_2
push eax
call fcn.0040a664
mov edx, dword [0x436c4c]
mov dword [edx], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x42d09b
lea eax, [ebp - 0x24]
mov edx, 3
call fcn.00406fa4
ret
Function at 0x42d374
Capabilities:
Query or enumerate registry value

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffa8
lea edi, [esp + 8]
mov dword [esp + 0xc], 0x80000002
mov dword [esp + 0x10], 0x80000001
cmp byte [0x43699a], 0
je 0x42d39f
mov byte [0x436998], 1
mov ebp, 2
lea esi, [esp + 0xc]
push esp
push 0x42d544
mov eax, dword [esi]
push eax
call sub.advapi32.dll_RegOpenKeyW
test eax, eax
jne 0x42d52e
xor eax, eax
mov dword [edi], eax
lea ebx, [esp + 0x18]
mov dword [esp + 4], 0x40
lea eax, [esp + 4]
push eax
push ebx
push edi
push 0
push 0x42d590
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x42d411
cmp dword [edi], 4
jne 0x42d3fc
cmp dword [ebx], 0
setne al
mov byte [0x436982], al
jmp 0x42d411
cmp dword [edi], 1
jne 0x42d411
push ebx
call sub.msvcrt.dll__wtol
pop ecx
dec eax
sete al
mov byte [0x436982], al
lea eax, [esp + 4]
push eax
push ebx
push edi
push 0
push 0x42d5b0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x42d454
cmp dword [edi], 4
jne 0x42d43f
cmp dword [ebx], 0
setne al
mov byte [0x436998], al
jmp 0x42d454
cmp dword [edi], 1
jne 0x42d454
push ebx
call sub.msvcrt.dll__wtol
pop ecx
dec eax
sete al
mov byte [0x436998], al
lea eax, [esp + 4]
push eax
push ebx
push edi
push 0
push 0x42d5d4
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x42d497
cmp dword [edi], 4
jne 0x42d482
cmp dword [ebx], 0
setne al
mov byte [0x436999], al
jmp 0x42d497
cmp dword [edi], 1
jne 0x42d497
push ebx
call sub.msvcrt.dll__wtol
pop ecx
dec eax
sete al
mov byte [0x436999], al
lea eax, [esp + 4]
push eax
push ebx
push edi
push 0
push 0x42d5f8
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x42d4de
cmp dword [edi], 4
jne 0x42d4c3
movzx eax, word [ebx]
mov word [0x4369a0], ax
jmp 0x42d4de
cmp dword [edi], 1
jne 0x42d4de
push 0
lea eax, [esp + 0x18]
push eax
push ebx
call sub.msvcrt.dll_wcstol
add esp, 0xc
mov word [0x4369a0], ax
lea eax, [esp + 4]
push eax
push ebx
push edi
push 0
push 0x42d614
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x42d525
cmp dword [edi], 4
jne 0x42d50a
movzx eax, word [ebx]
mov word [0x4369a2], ax
jmp 0x42d525
cmp dword [edi], 1
jne 0x42d525
push 0
lea eax, [esp + 0x18]
push eax
push ebx
call sub.msvcrt.dll_wcstol
add esp, 0xc
mov word [0x4369a2], ax
mov eax, dword [esp]
push eax
call sub.advapi32.dll_RegCloseKey_1
add esi, 4
dec ebp
jne 0x42d3a8
mov al, 1
add esp, 0x58
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x42f2b4
Capabilities:
Set current directory

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdec
xor edi, edi
mov word [esp], 0x3d
dec eax
add ax, 0x41
mov word [esp + 2], ax
mov word [esp + 4], 0x3a
mov word [esp + 6], 0
xor ebx, ebx
mov eax, esp
call fcn.0041c3e4
mov esi, eax
test esi, esi
je 0x42f2f8
push esi
call sub.kernel32.dll_SetCurrentDirectoryW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x42f363
test esi, esi
je 0x42f309
push 1
call sub.kernel32.dll_SetErrorMode
mov edi, eax
movzx eax, word [esp + 2]
mov word [esp + 8], ax
movzx eax, word [esp + 4]
mov word [esp + 0xa], ax
mov word [esp + 0xc], 0x5c
mov word [esp + 0xe], 0
lea edx, [esp + 8]
mov eax, esp
call fcn.0041c694
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
jne 0x42f359
push 0xffffffffffffffff
lea ecx, [esp + 0x218]
xor edx, edx
mov eax, 0x42f388
call fcn.0042f45c
test esi, esi
je 0x42f363
push edi
call sub.kernel32.dll_SetErrorMode
mov eax, dword [0x436cd0]
xor edx, edx
call fcn.0041e454
add esp, 0x214
pop edi
pop esi
pop ebx
ret
Function at 0x42f644
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe0
mov dword [esp + 4], ecx
mov esi, edx
mov dword [esp], eax
mov dword [esp + 0x1c], 0xffffffff
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0xc
mov eax, 3
and eax, esi
cmp eax, 2
ja 0x42f688
mov edx, 1
and edx, esi
mov ecx, 8
and ecx, esi
and edx, ecx
je 0x42f690
or eax, 0xffffffff
jmp 0x42f865
test eax, eax
je 0x42f6b9
mov edi, 0x40000000
mov edx, 0x42f870
mov eax, dword [esp]
call fcn.0041532c
test eax, eax
je 0x42f6b2
mov dword [esp + 4], 1
mov ebp, 2
jmp 0x42f6c3
mov edi, 0x80000000
mov ebp, 3
cmp esi, 0x10a
jne 0x42f744
push 0
push 0x80
push 3
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
push eax
mov eax, 0x80000000
or eax, edi
push eax
mov eax, dword [esp + 0x18]
push eax
call sub.kernel32.dll_CreateFileW_1
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x42f78d
push 0
push 0x80
push ebp
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
push eax
push edi
mov eax, dword [esp + 0x18]
push eax
call sub.kernel32.dll_CreateFileW_1
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x42f78d
call sub.kernel32.dll_GetLastError_2
mov dword [0x4369c4], eax
cmp dword [0x4369c4], 0x6e
jne 0x42f73c
mov dword [0x4369c4], 2
or eax, 0xffffffff
jmp 0x42f865
push 0
push 0x80
push ebp
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
push eax
push edi
mov eax, dword [esp + 0x18]
push eax
call sub.kernel32.dll_CreateFileW_1
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x42f78d
call sub.kernel32.dll_GetLastError_2
mov dword [0x4369c4], eax
cmp dword [0x4369c4], 0x6e
jne 0x42f785
mov dword [0x4369c4], 2
or eax, 0xffffffff
jmp 0x42f865
push 8
push ebx
call sub.msvcrt.dll__open_osfhandle
add esp, 8
mov edi, eax
test esi, 8
je 0x42f85c
mov eax, edi
call fcn.0041e334
test eax, eax
jne 0x42f85c
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
test eax, eax
je 0x42f85c
mov word [esp + 8], 0
mov dword [esp + 0x10], 0xffffffff
push 2
lea eax, [esp + 0x14]
push eax
push 0xffffffffffffffff
push ebx
call sub.kernel32.dll_SetFilePointer_1
mov ebp, eax
call sub.kernel32.dll_GetLastError_2
mov dword [0x4369c4], eax
cmp ebp, 0xffffffff
jne 0x42f80e
cmp dword [0x4369c4], 0
je 0x42f80e
cmp edi, 0xffffffff
je 0x42f809
push edi
call sub.msvcrt.dll__close
pop ecx
or eax, 0xffffffff
jmp 0x42f865
push 0
lea eax, [esp + 0x10]
push eax
push 1
lea eax, [esp + 0x14]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
mov ebp, eax
test ebp, ebp
jne 0x42f83d
xor eax, eax
mov dword [esp + 0x10], eax
push 2
lea eax, [esp + 0x14]
push eax
push 0
push ebx
call sub.kernel32.dll_SetFilePointer_1
cmp word [esp + 8], 0x1a
jne 0x42f85c
mov dword [esp + 0x10], 0xffffffff
push 2
lea eax, [esp + 0x14]
push eax
push 0xffffffffffffffff
push ebx
call sub.kernel32.dll_SetFilePointer_1
mov eax, edi
call fcn.0042f988
mov eax, edi
add esp, 0x20
pop ebp
pop edi
pop esi
pop ebx
ret