joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401020
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 0x401039
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401074
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x401070
lea ebx, [ebx]
cmp esi, eax
jae 0x401074
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401060
cmp esi, eax
jb 0x40107a
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402040
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x74
push ebx
mov ebx, dword [esp + 0x80]
mov eax, dword [ebx + 0x98]
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push 0x640000
push 0
push 0x401
push eax
call esi
mov ecx, dword [ebx + 0x98]
push 0
push 0xa
push 0x402
push ecx
call esi
push str.Installing_prerequisites...
mov ecx, ebx
call fcn.0040ff7f
push 0x44
lea edx, [esp + 0x3c]
push 0
push edx
call fcn.0041af10
mov eax, dword [esp + 0x8c]
mov eax, dword [eax]
push eax
mov dword [esp + 0x48], 0x44
call fcn.0041aeb2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4020e2
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
push 0
push 0x4000000
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4020ed
push esi
call fcn.0041ae24
add esp, 4
pop esi
mov eax, 2
pop ebx
add esp, 0x74
ret
push edi
push esi
call fcn.0041ae24
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
push 0x64
push ecx
mov edi, 0xa
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x402195
push ebp
mov ebp, dword [sym.imp.USER32.dll_GetMessageA]
inc edi
cmp edi, 0x64
jle 0x40212a
xor edi, edi
mov edx, dword [ebx + 0x98]
push 0
push edi
push 0x402
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
nop
push 0
push 0
push 0
push 0
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x402180
push 0
push 0
push 0
lea ecx, [esp + 0x30]
push ecx
call ebp
lea edx, [esp + 0x24]
push edx
mov esi, eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
test esi, esi
jne 0x402140
mov ecx, dword [esp + 0x14]
push 0x64
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x402122
pop ebp
mov eax, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
pop edi
test eax, eax
je 0x4020e2
mov eax, dword [esp + 8]
test eax, eax
je 0x4021c9
xor ecx, ecx
cmp eax, 0xbc2
setne cl
pop esi
pop ebx
inc ecx
mov eax, ecx
add esp, 0x74
ret
pop esi
xor eax, eax
pop ebx
add esp, 0x74
ret
Function at 0x4037f0
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push 0
push 0
push ebp
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edi, eax
xor ebx, ebx
test edi, edi
jne 0x40381d
mov ecx, esi
call fcn.00401300
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret 4
mov eax, dword [esi]
mov edx, dword [eax - 8]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
sub edx, edi
or ecx, edx
jge 0x40383b
push edi
mov ecx, esi
call fcn.00401360
mov eax, dword [esi]
push edi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov eax, dword [esi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x40385d
push ecx
push eax
call fcn.0041ab6f
add esp, 8
test eax, eax
jl 0x40387a
mov ecx, dword [esi]
cmp eax, dword [ecx - 8]
jg 0x40387a
mov dword [ecx - 0xc], eax
mov ecx, dword [esi]
pop edi
mov byte [eax + ecx], bl
pop esi
mov ebx, 1
pop ebp
mov eax, ebx
pop ebx
ret 4
push 0x80070057
call fcn.00401000
int3

Function at 0x403bf0
Capabilities:
Create directory

Disassembly:
push ecx
mov eax, dword [str.TempSfxDir]
push ebx
push esi
push edi
push eax
push 0
mov esi, ecx
mov byte [esp + 0x17], 0
call fcn.0041b68b
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x403c9d
add esi, 4
lea edx, [eax + 1]
jmp 0x403c20
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403c20
push ebp
sub eax, edx
push eax
push ebx
mov ecx, esi
call fcn.00401610
mov eax, dword [esi]
mov ebp, dword [eax - 0xc]
mov edx, dword [eax - 8]
mov ecx, 1
sub ecx, dword [eax - 4]
lea edi, [ebp + 1]
sub edx, edi
or ecx, edx
jge 0x403c54
push edi
mov ecx, esi
call fcn.00401360
mov eax, dword [esi]
mov byte [eax + ebp], 0x5c
pop ebp
test edi, edi
jl 0x403ca6
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x403ca6
mov dword [eax - 0xc], edi
mov ecx, dword [esi]
push ebx
mov byte [edi + ecx], 0
call fcn.0041ae24
mov eax, dword [esi]
add esp, 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x403c9d
mov esi, dword [esi]
push esi
push str.SfxDir
call fcn.0041b612
add esp, 8
test eax, eax
mov al, 1
je 0x403ca1
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebx
pop ecx
ret
push 0x80070057
call fcn.00401000
int3
Function at 0x404940
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x42f8c9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
push ecx
lea ecx, [esp + 0xc]
mov dword [esp + 8], 0
call fcn.004048c0
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 1
call fcn.00404410
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 2
call fcn.00404490
mov esi, dword [esp + 0x30]
push eax
mov ecx, esi
call fcn.004048c0
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], 1
mov byte [esp + 0x28], 1
mov dword [esp + 0x14], vtable.CMNStr.0
test eax, eax
je 0x4049c2
push eax
call fcn.0040c931
add esp, 4
mov eax, dword [esp + 0x10]
mov byte [esp + 0x28], 0
mov dword [esp + 8], vtable.CMNStr.0
test eax, eax
je 0x4049e0
push eax
call fcn.0040c931
add esp, 4
mov ecx, dword [esp + 0x20]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret 8
Function at 0x404b60
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x78
push esi
push edi
push 0x44
lea eax, [esp + 0x40]
push 0
push eax
mov dword [esp + 0x14], 0xffffffff
call fcn.0041af10
mov edi, dword [esp + 0x90]
mov cx, word [esp + 0x94]
or dword [esp + 0x74], 1
mov eax, edi
add esp, 0xc
or word [esp + 0x6c], cx
mov dword [esp + 0x3c], 0x44
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404ba4
sub eax, edx
inc eax
push eax
call fcn.0040c8f7
mov esi, eax
add esp, 4
mov dword [esp + 0xc], esi
test esi, esi
jne 0x404bca
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x78
ret
mov edx, esi
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x404bd0
push str..exe
push edi
call fcn.0041bd30
add esp, 8
test eax, eax
je 0x404bf8
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x40]
push eax
jmp 0x404c02
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x40]
push edx
push 0
push 0
push 0xc000000
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x404cf0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
push 0x64
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x404cc9
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
push ebp
mov ebp, dword [sym.imp.USER32.dll_DispatchMessageA]
lea esp, [esp]
push 0
push 0
push 0
push 0
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x404cb3
push 0
push 0
push 0
lea eax, [esp + 0x34]
push eax
call edi
lea ecx, [esp + 0x28]
push ecx
mov esi, eax
call ebx
lea edx, [esp + 0x28]
push edx
call ebp
test esi, esi
je 0x404caf
push 0
push 0
push 0
push 0
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x404c77
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push 0x64
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x404c60
pop ebp
pop ebx
mov eax, dword [esp + 0x10]
lea edx, [esp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x404ce5
mov dword [esp + 8], 0xffffffff
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0040c931
mov eax, dword [esp + 0xc]
add esp, 4
pop edi
pop esi
add esp, 0x78
ret
Function at 0x404d10
Capabilities:
Access peb ldr_data
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x42f992
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x180
push esi
push edi
lea ecx, [esp + 0x24]
call fcn.004043d0
lea ecx, [esp + 0xc]
mov dword [esp + 0x190], 0
call fcn.004043d0
lea ecx, [esp + 0x18]
mov byte [esp + 0x190], 1
call fcn.004043d0
mov esi, dword [esp + 0x198]
push str..
lea eax, [esp + 0x34]
push eax
mov ecx, esi
mov byte [esp + 0x198], 2
mov byte [esp + 0x13], 1
call fcn.00404940
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x194], 3
call fcn.00404920
lea ecx, [esp + 0x30]
mov byte [esp + 0x190], 2
call fcn.00404470
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x28]
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x404ebe
push ebx
mov bl, 4
lea edx, [esp + 0x78]
push edx
lea ecx, [esp + 0x14]
call fcn.00404530
push 0x5c
lea eax, [esp + 0x44]
push eax
mov ecx, esi
call fcn.00404a00
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x38]
push edx
mov ecx, eax
mov byte [esp + 0x19c], bl
call fcn.00404ac0
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x198], 5
call fcn.00404920
lea ecx, [esp + 0x34]
mov byte [esp + 0x194], bl
call fcn.00404470
lea ecx, [esp + 0x40]
mov byte [esp + 0x194], 2
call fcn.00404470
test dword [esp + 0x4c], 0x10
je 0x404e74
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
push 0x431ecc
lea ecx, [esp + 0x14]
call edx
test al, al
je 0x404ea2
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
push 0x431ec8
lea ecx, [esp + 0x14]
call edx
test al, al
je 0x404ea2
lea eax, [esp + 0x1c]
push eax
call fcn.00404d10
add esp, 4
test al, al
jmp 0x404e9b
push 0x80
lea ecx, [esp + 0x20]
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x1c]
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404ea2
mov byte [esp + 0xf], 0
lea ecx, [esp + 0x4c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404dc6
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebx
push 0x80
mov ecx, esi
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, esi
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
test eax, eax
jne 0x404ee9
mov byte [esp + 3], al
lea ecx, [esp + 0x10]
mov byte [esp + 0x188], 1
call fcn.00404470
lea ecx, [esp + 4]
mov byte [esp + 0x188], 0
call fcn.00404470
lea ecx, [esp + 0x1c]
mov dword [esp + 0x188], 0xffffffff
call fcn.00404470
mov ecx, dword [esp + 0x180]
mov al, byte [esp + 3]
mov dword fs:[0], ecx
add esp, 0x18c
ret
Function at 0x404f40
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively
Move file

Disassembly:
push 0xffffffffffffffff
push 0x42f992
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x180
push ebx
push esi
push edi
lea ecx, [esp + 0x28]
call fcn.004043d0
lea ecx, [esp + 0x10]
mov dword [esp + 0x194], 0
call fcn.004043d0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x194], 1
call fcn.004043d0
mov esi, dword [esp + 0x19c]
push str..
lea eax, [esp + 0x38]
push eax
mov ecx, esi
mov byte [esp + 0x19c], 2
mov byte [esp + 0x17], 1
call fcn.00404940
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x198], 3
call fcn.00404920
lea ecx, [esp + 0x34]
mov byte [esp + 0x194], 2
call fcn.00404470
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4050f6
lea edx, [esp + 0x78]
push edx
lea ecx, [esp + 0x14]
mov bl, 1
call fcn.00404530
push 0x5c
lea eax, [esp + 0x44]
push eax
mov ecx, esi
call fcn.00404a00
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x38]
push edx
mov ecx, eax
mov byte [esp + 0x19c], 4
call fcn.00404ac0
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x198], 5
call fcn.00404920
lea ecx, [esp + 0x34]
mov byte [esp + 0x194], 4
call fcn.00404470
lea ecx, [esp + 0x40]
mov byte [esp + 0x194], 2
call fcn.00404470
test dword [esp + 0x4c], 0x10
je 0x4050a6
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
push 0x431ecc
lea ecx, [esp + 0x14]
call edx
test al, al
je 0x4050bf
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
push 0x431ec8
lea ecx, [esp + 0x14]
call edx
test al, al
je 0x4050bf
lea eax, [esp + 0x1c]
push eax
call fcn.00404f40
add esp, 4
mov bl, al
jmp 0x4050bf
push 4
push 0
lea ecx, [esp + 0x24]
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
setne bl
cmp byte [esp + 0xf], 0
je 0x4050cf
mov byte [esp + 0xf], 1
test bl, bl
jne 0x4050d4
mov byte [esp + 0xf], 0
lea ecx, [esp + 0x4c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404ff4
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [esp + 0xf], 0
je 0x405110
push 4
push 0
mov ecx, esi
call fcn.00404b50
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x405110
mov bl, 1
jmp 0x405112
xor bl, bl
lea ecx, [esp + 0x1c]
mov byte [esp + 0x194], 1
call fcn.00404470
lea ecx, [esp + 0x10]
mov byte [esp + 0x194], 0
call fcn.00404470
lea ecx, [esp + 0x28]
mov dword [esp + 0x194], 0xffffffff
call fcn.00404470
mov ecx, dword [esp + 0x18c]
pop edi
pop esi
mov al, bl
pop ebx
mov dword fs:[0], ecx
add esp, 0x18c
ret
Function at 0x405270
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
xor al, al
cmp dword [esi + 8], 0
je 0x4052f7
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x405289
mov al, 1
pop esi
ret 8
mov ecx, dword [esp + 8]
push ebp
lea ebp, [esi + 0x10]
push edi
mov dword [ebp], ecx
mov dword [esi + 0x14], eax
xor edi, edi
lea ebx, [ebx]
cmp dword [esi + 0x20], 0
jbe 0x4052fb
cmp dword [esi + 0x14], 0
jbe 0x4052fb
push 0
push ebp
call fcn.00406ed0
add esp, 8
cmp dword [esi + 0x20], 0
mov edi, eax
jne 0x4052ef
mov edx, dword [esi + 8]
mov eax, dword [esi + 0x48]
push edx
push 0x1000
push 1
push eax
call fcn.0041c732
add esp, 0x10
cmp eax, 0x1000
je 0x4052e2
mov edi, 0xfffffffd
mov ecx, dword [esi + 0x48]
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x20], 0x1000
test edi, edi
je 0x4052a0
pop edi
xor al, al
pop ebp
pop esi
ret 8
test edi, edi
jne 0x4052f3
pop edi
pop ebp
mov al, 1
pop esi
ret 8

Function at 0x405317
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
xor bl, bl
push esi
mov esi, ecx
mov byte [eax], bl
cmp dword [esi + 8], 0
je 0x4053de
push ebp
mov ebp, dword [esp + 0x14]
cmp dword [ebp], 0
je 0x4053d6
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x1c], ecx
mov edx, dword [ebp]
mov dword [esi + 0x20], edx
xor eax, eax
push edi
cmp dword [esi + 0x20], 0
jbe 0x40539d
cmp dword [esi + 0x14], 0
jne 0x40538b
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x48]
push eax
push 0x1000
push 1
push ecx
call fcn.0041ca88
mov edi, eax
add esp, 0x10
cmp edi, 0x1000
jae 0x405382
mov edx, dword [esi + 8]
push edx
call fcn.0041c7b4
add esp, 4
test eax, eax
je 0x4053e5
mov eax, dword [esi + 0x48]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edi
lea ecx, [esi + 0x10]
push 0
push ecx
call fcn.00408a50
add esp, 8
test eax, eax
je 0x405345
cmp eax, 1
jne 0x4053c3
mov edx, dword [esp + 0x1c]
mov byte [edx], al
lea eax, [esi + 0x10]
push eax
call fcn.00409f60
mov ecx, dword [esi + 0x20]
add esp, 4
sub dword [ebp], ecx
pop edi
pop ebp
pop esi
mov al, 1
pop ebx
ret 0xc
test eax, eax
jne 0x4053e5
mov ecx, dword [esi + 0x20]
sub dword [ebp], ecx
pop edi
pop ebp
pop esi
mov al, 1
pop ebx
ret 0xc
pop ebp
pop esi
mov al, bl
pop ebx
ret 0xc
pop esi
mov al, bl
pop ebx
ret 0xc
pop edi
pop ebp
pop esi
mov al, bl
pop ebx
ret 0xc
Function at 0x4054e0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
xor al, al
cmp dword [esi + 8], 0
je 0x40557a
push ebx
push ebp
lea ebx, [esi + 0x10]
push edi
push 4
push ebx
call fcn.00406ed0
mov ebp, eax
mov eax, dword [esi + 0x20]
add esp, 8
cmp eax, 0x1000
jae 0x40553c
mov ecx, dword [esi + 0x48]
mov edi, 0x1000
sub edi, eax
mov eax, dword [esi + 8]
push eax
push edi
push 1
push ecx
call fcn.0041c732
add esp, 0x10
cmp edi, eax
je 0x40552f
mov ebp, 0xfffffffd
mov edx, dword [esi + 0x48]
mov dword [esi + 0x1c], edx
mov dword [esi + 0x20], 0x1000
test ebp, ebp
je 0x4054f5
pop edi
cmp ebp, 1
pop ebp
jne 0x405577
push ebx
call fcn.004076b0
add esp, 4
test eax, eax
jne 0x405577
mov eax, dword [esi + 0x48]
test eax, eax
je 0x40556b
push eax
call fcn.0040c931
add esp, 4
mov dword [esi + 0x48], 0
pop ebx
mov dword [esi + 8], 0
mov al, 1
pop esi
ret
xor al, al
pop ebx
pop esi
ret

Function at 0x405890
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x400
push ebx
push esi
push edi
mov edi, dword [esp + 0x410]
mov eax, edi
mov ebx, ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4058a7
sub eax, edx
mov esi, eax
cmp esi, 0x400
jae 0x4058f3
mov eax, dword [ebx + 0x5c]
push eax
push esi
lea ecx, [esp + 0x14]
push 1
push ecx
call fcn.0041ca88
add esp, 0x10
cmp esi, eax
je 0x405901
cmp dword [ebx + 0x3c], 0x10
jb 0x4058dd
mov eax, dword [ebx + 0x28]
jmp 0x4058e0
lea eax, [ebx + 0x28]
mov edx, dword [ebx + 4]
mov ecx, dword [edx + 4]
push 0
push eax
push 0x2718
call fcn.004051d0
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x400
ret 4
mov byte [esp + esi + 0xc], 0
mov ecx, edi
lea eax, [esp + 0xc]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405930
test dl, dl
je 0x40592c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405930
add eax, 2
add ecx, 2
test dl, dl
jne 0x405910
xor eax, eax
jmp 0x405935
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405968
cmp dword [ebx + 0x3c], 0x10
jb 0x405944
mov eax, dword [ebx + 0x28]
jmp 0x405947
lea eax, [ebx + 0x28]
push 0
push eax
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 4]
push 0x2715
call fcn.004051d0
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x400
ret 4
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0x400
ret 4
Function at 0x406be0
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x406c88
cmp dword [esi + 0x2c], ebx
je 0x406c88
mov ecx, dword [esi + 0x80]
cmp ecx, ebx
je 0x406c88
mov edx, dword [esi + 0x38]
push edi
cmp eax, edx
jb 0x406c3e
cmp edx, ebx
jbe 0x406c2d
mov eax, dword [esi + 0x10]
push ecx
mov edi, edx
push edi
push 1
push eax
call fcn.0041c732
add esp, 0x10
cmp edi, eax
jne 0x406c38
add dword [esi + 0x3c], edi
mov ecx, esi
call fcn.00406970
test al, al
jne 0x406c82
pop edi
pop esi
mov al, bl
pop ebx
ret
push ecx
mov ecx, dword [esi + 0x10]
push eax
push 1
push ecx
call fcn.0041c732
add esp, 0x10
cmp dword [esi + 0x14], eax
jne 0x406c38
cmp dword [esi + 0x60], 0x10
jb 0x406c5e
mov eax, dword [esi + 0x4c]
jmp 0x406c61
lea eax, [esi + 0x4c]
mov edx, dword [esi + 0x3c]
push edx
push eax
mov eax, dword [esi + 4]
mov ecx, dword [eax + 4]
push 8
call fcn.004051d0
mov eax, dword [esi + 0x14]
sub dword [esi + 0x38], eax
add dword [esi + 0x10], eax
add dword [esi + 0x3c], eax
mov dword [esi + 0x14], ebx
pop edi
pop esi
mov al, 1
pop ebx
ret
pop esi
mov al, bl
pop ebx
ret
Function at 0x40d800
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x58], ebx
test ebx, 0xffff0000
jne 0x40d824
cmp dword [edi + 0x54], 0
jne 0x40d824
movzx eax, bx
mov dword [edi + 0x54], eax
call fcn.00415e1e
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ebx, eax
push ebx
mov ecx, edi
call fcn.0040d7c1
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x41545a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x4154a1
call fcn.00415e1e
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4154a1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x4154bd
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.00414fd4
mov esi, eax
test edi, edi
je 0x4154bb
test ebx, ebx
je 0x4154bb
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x41d64c
call fcn.0041d30b
mov dword [eax], esi
call fcn.0041d2f8
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0041cd87
add esp, 0x14
push 0x16
pop eax
jmp 0x41d6a1
test dword [ebp + 0xc], 0xfffffff9
jne 0x41d628
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41d679
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041d31e
pop ecx
call fcn.0041d2f8
mov eax, dword [eax]
jmp 0x41d6a1
test al, 0x10
jne 0x41d69f
test al, 1
je 0x41d69f
test byte [ebp + 0xc], 2
je 0x41d69f
call fcn.0041d30b
mov dword [eax], 5
call fcn.0041d2f8
mov dword [eax], 0xd
jmp 0x41d670
xor eax, eax
pop esi
pop ebp
ret

Function at 0x41d7da
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x43ef50]
jne 0x41d7e4
repz ret
jmp fcn.0042958d
Function at 0x42a600
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004229d2
and dword [ebp - 4], 0
cmp dword [0x442aa8], 0
mov ebx, eax
jne 0x42a6b1
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x42a762
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x438f5c
push edi
call esi
test eax, eax
je 0x42a762
push eax
call fcn.00422960
mov dword [esp], 0x438f4c
push edi
mov dword [0x442aa8], eax
call esi
push eax
call fcn.00422960
mov dword [esp], 0x438f38
push edi
mov dword [0x442aac], eax
call esi
push eax
call fcn.00422960
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x442ab0], eax
call esi
push eax
call fcn.00422960
pop ecx
mov dword [0x442ab8], eax
test eax, eax
je 0x42a6b1
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00422960
pop ecx
mov dword [0x442ab4], eax
mov eax, dword [0x442ab4]
cmp eax, ebx
je 0x42a709
cmp dword [0x442ab8], ebx
je 0x42a709
push eax
call fcn.004229db
push dword [0x442ab8]
mov esi, eax
call fcn.004229db
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x42a709
test edi, edi
je 0x42a709
call esi
test eax, eax
je 0x42a700
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x42a700
test byte [ebp - 0xc], 1
jne 0x42a709
or dword [ebp + 0x10], 0x200000
jmp 0x42a742
mov eax, dword [0x442aac]
cmp eax, ebx
je 0x42a742
push eax
call fcn.004229db
pop ecx
test eax, eax
je 0x42a742
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x42a742
mov eax, dword [0x442ab0]
cmp eax, ebx
je 0x42a742
push eax
call fcn.004229db
pop ecx
test eax, eax
je 0x42a742
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x442aa8]
call fcn.004229db
pop ecx
test eax, eax
je 0x42a762
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x42a764
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret