joyce8/EMBER2024-capa huggingface dataset:
Function at 0x432050
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x1038
call fcn.00437d10
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x437970
mov edi, ecx
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], edx
lea esi, [ebp - 0x1044]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
push 0x1000
push 0
push esi
call fcn.004393e0
add esp, 0xc
xorps xmm0, xmm0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x44]
push 0x429be0
push eax
push 0x1000
push esi
push edi
call dword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
je 0x4321a4
mov ebx, dword [sym.imp.kernel32.dll_SleepEx]
mov dword [ebp - 0x20], edi
push 1
push 0xffffffffffffffff
call ebx
cmp dword [ebp - 0x30], 0
je 0x4320da
cmp dword [ebp - 0x2c], 0
jne 0x4321b5
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x4321b5
cmp esi, 0x1000
ja 0x4321f1
xor edi, edi
nop dword [eax]
mov eax, esi
sub eax, edi
jb 0x4321d7
xorps xmm0, xmm0
lea edx, [ebp - 0x30]
lea ecx, [ebp + edi - 0x1044]
mov dword [ebp - 0x30], 0
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], edx
push 0x429be0
lea edx, [ebp - 0x44]
push edx
push eax
push ecx
push dword [ebp - 0x24]
call dword [sym.imp.kernel32.dll_WriteFileEx]
test eax, eax
je 0x4321ac
nop dword [eax]
push 1
push 0xffffffffffffffff
call ebx
cmp dword [ebp - 0x30], 0
je 0x432150
cmp dword [ebp - 0x2c], 0
jne 0x4321b2
add edi, dword [ebp - 0x28]
cmp edi, esi
jne 0x432110
xorps xmm0, xmm0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], eax
push 0x429be0
lea eax, [ebp - 0x44]
push eax
push 0x1000
lea eax, [ebp - 0x1044]
push eax
mov edi, dword [ebp - 0x20]
push edi
call dword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
jne 0x4320da
call dword [sym.imp.kernel32.dll_GetLastError]
jmp 0x4321b5
call dword [sym.imp.kernel32.dll_GetLastError]
mov edi, dword [ebp - 0x20]
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0x24]
call esi
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x1038
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x10], 0
mov ecx, edi
mov edx, esi
push 0x453248
call fcn.00446bd0
add esp, 4
jmp 0x43220c
mov dword [ebp - 0x10], 0
mov ecx, esi
mov edx, 0x1000
push 0x453248
call fcn.004469c0
add esp, 4
ud2
Function at 0x4322e0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x50
mov esi, esp
mov dword [esi + 0x38], ebp
mov dword [esi + 0x3c], esp
mov dword [esi + 0x48], 0xffffffff
mov dword [esi + 0x44], 0x437990
lea eax, [esi + 0x40]
xorps xmm0, xmm0
mov ecx, dword fs:[0]
mov dword [esi + 0x40], ecx
mov dword fs:[0], eax
movaps xmmword [esi + 0x10], xmm0
lea eax, [esi + 0x10]
push 0x10
push eax
call dword [sym.imp.advapi32.dll_SystemFunction036]
test al, al
je 0x432344
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
mov dword fs:[0], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.kernel32.dll_GetLastError]
mov edx, esi
lea ecx, [esi + 8]
mov dword [esi + 0x20], 0x453358
mov dword [esi + 0x24], 1
mov dword [esi + 0x30], 0
mov byte [esi], 0
mov dword [esi + 4], eax
mov dword [esi + 0x48], 0
mov dword [esi + 8], edx
mov dword [esi + 0x28], ecx
lea ecx, [esi + 0x20]
mov edx, 0x453384
mov dword [esi + 0xc], fcn.004254c0
mov dword [esi + 0x2c], 1
call fcn.004468b0
ud2
Function at 0x436510
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x34
mov ebp, dword [esp + 0x48]
mov ebx, edx
mov edx, dword [ebp + 4]
mov edi, dword [ebp + 8]
mov eax, edx
sub eax, edi
jb 0x4365c2
mov esi, ecx
mov ecx, dword [ebp]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x103
lea edx, [esp + 4]
add ecx, edi
push 0
push 0
push eax
push ecx
push edx
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, 0x103
jne 0x436570
push 0xffffffffffffffff
push ebx
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [esp + 4]
xor ecx, ecx
cmp eax, 0xc0000011
je 0x436588
cmp eax, 0x103
je 0x4365d3
test eax, eax
js 0x4365a3
mov ecx, dword [esp + 8]
add ecx, edi
mov dword [ebp + 8], ecx
mov eax, dword [ebp + 0xc]
cmp eax, ecx
cmova ecx, eax
mov dword [ebp + 0xc], ecx
mov byte [esi], 4
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
mov edi, eax
call fcn.00420060
cmp al, 0xb
je 0x436598
mov dword [esi], 0
mov dword [esi + 4], edi
jmp 0x43659b
mov ecx, edi
push 0x451144
call fcn.004468e0
add esp, 4
ud2
mov eax, esp
mov dword [esp + 0x1c], 0x453010
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 0
mov dword [esp + 0xc], 0
mov byte [esp + 0x10], 0
lea ecx, [esp + 0xc]
lea edx, [esp + 0x14]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x28], 0
push eax
push ecx
push edx
call fcn.0041d3b0
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
call fcn.0041d4e0
mov ecx, 7
int 0x29
ud2

Function at 0x436640
Capabilities:
Delete file

Disassembly:
push ebx
push edi
push esi
sub esp, 0x18
mov esi, ecx
mov ecx, esp
push dword [esp + 0x28]
call fcn.0041f780
add esp, 4
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
mov eax, dword [esp + 8]
test ecx, ecx
je 0x4366a4
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
lea ecx, [esp + 0xc]
mov edx, esp
push 1
call fcn.00426720
add esp, 4
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
test edi, edi
je 0x4366a0
push edi
call dword [sym.imp.kernel32.dll_DeleteFileW]
test eax, eax
je 0x4366ab
mov byte [esi], 4
test ebx, ebx
jne 0x4366bb
jmp 0x4366c7
mov eax, dword [esp + 0x14]
mov dword [esi], ebx
mov dword [esi + 4], eax
jmp 0x4366c7
call dword [sym.imp.kernel32.dll_GetLastError]
mov byte [esi], 0
mov dword [esi + 4], eax
test ebx, ebx
je 0x4366c7
mov ecx, edi
mov edx, 2
call fcn.0040c5e0
add esp, 0x18
pop esi
pop edi
pop ebx
ret

Function at 0x43837b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
je 0x4383ba
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4383ba
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4383ba
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4383ba
cmp dword [ecx + 0x74], 0xe
jbe 0x4383ba
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x43fc13
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x43fcb0
push ebx
push esi
call fcn.0043fbdc
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0043fb70
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x43fc5d
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x43fcaf
push edi
push eax
call fcn.00440830
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x43fc7d
call fcn.0043e6d1
pop ecx
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x43fcae
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0043fb70
add esp, 0x20
test eax, eax
jne 0x43fc9c
push edi
call fcn.0043e6d1
jmp 0x43fca4
push ebx
call fcn.0043e6d1
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x440fad
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x456048
push 0x456040
push str.FlsAlloc
push 0x1f
call fcn.00440e6c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x440fe1
push dword [ebp + 8]
mov ecx, esi
call dword [0x4481e8]
call esi
jmp 0x440fe7
call dword [sym.imp.kernel32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x44102e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x456058
push 0x456050
push str.FlsGetValue
push 0x21
call fcn.00440e6c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x441065
push dword [ebp + 8]
mov ecx, esi
call dword [0x4481e8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.kernel32.dll_TlsGetValue]

Function at 0x44106d
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x456060
push 0x456058
push str.FlsSetValue
push 0x22
call fcn.00440e6c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4410a7
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4481e8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.kernel32.dll_TlsSetValue]
Function at 0x446500
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x44652d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x44652d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x4474a0
Capabilities:
Allocate thread local storage

Disassembly:
push ebx
push edi
push esi
sub esp, 0x20
cmp dword [ecx + 4], 0
mov esi, ecx
je 0x447511
lea ebx, [esi + 0xc]
mov dword [esp + 4], 0
lea eax, [esp + 4]
push 0
push eax
push 0
push ebx
call dword [sym.imp.kernel32.dll_InitOnceBeginInitialize]
cmp eax, 1
mov dword [esp], eax
jne 0x44754c
cmp dword [esp + 4], 0
je 0x447533
call dword [sym.imp.kernel32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x447561
mov edi, eax
inc eax
mov dword [esi], eax
mov eax, dword [0x45da5c]
nop dword [eax]
mov dword [esi + 8], eax
lock cmpxchg dword [0x45da5c], esi
jne 0x4474f0
mov byte [0x45da58], 1
push 0
push 0
push ebx
call dword [sym.imp.kernel32.dll_InitOnceComplete]
jmp 0x447543
call dword [sym.imp.kernel32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esp], eax
je 0x4475a4
mov ecx, eax
xor eax, eax
inc ecx
lock cmpxchg dword [esi], ecx
jne 0x447537
mov edi, dword [esp]
jmp 0x447543
mov edi, dword [esi]
jmp 0x447542
mov edi, eax
push dword [esp]
call dword [sym.imp.kernel32.dll_TlsFree]
dec edi
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
ret
mov ecx, esp
lea edx, [esp + 8]
mov dword [esp + 8], 0
call fcn.004475e0
ud2
push 0
push 4
push ebx
call dword [sym.imp.kernel32.dll_InitOnceComplete]
lea ecx, [esp + 8]
mov edx, 0x453678
mov dword [esp + 8], 0x453640
mov dword [esp + 0xc], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0x453e90
mov dword [esp + 0x14], 0
call fcn.004468b0
ud2
mov ecx, esp
lea edx, [esp + 8]
mov dword [esp + 8], 0x453640
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 0x453e90
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
call fcn.00447620
ud2
Function at 0x4011f0
Capabilities:
Get system information on windows
Print debug messages

Disassembly:
sub esp, 0x24
push ebx
push ebp
xor ebp, ebp
push edi
lea eax, [esp + 0xc]
push eax
mov dword [esi], ebp
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov dword [esi + 0x24], ebp
mov dword [esi + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 0x10]
mov edi, 0x200000
xor edx, edx
mov eax, edi
div ecx
test edx, edx
je 0x401232
inc edi
xor edx, edx
mov eax, edi
div ecx
test edx, edx
jne 0x401227
push 4
push 0x3000
push edi
push ebp
mov dword [esi + 0x28], edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
cmp ebx, ebp
je 0x401257
push edi
push ebp
push ebx
call fcn.0049af70
add esp, 0xc
jmp 0x401262
push str.CFastLogBlock::create_block:_AllocMemoryStreamBlock:_VirtualAlloc_FAILED_____r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [esi], ebx
mov eax, esi
cmp ebx, ebp
je 0x40127a
mov ecx, dword [esi + 0x28]
mov edx, dword [esp + 0x34]
mov dword [esi + 4], ecx
mov dword [esi + 8], ebx
mov dword [esi + 0x24], edx
pop edi
pop ebp
pop ebx
add esp, 0x24
ret 4

Function at 0x401930
Capabilities:
Get file size

Disassembly:
mov eax, dword [esi + 0xa0]
sub esp, 0x10
push ebx
push ebp
push edi
cmp eax, 0xffffffff
je 0x401948
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x58], 8
jb 0x401953
mov ebp, dword [esi + 0x44]
jmp 0x401956
lea ebp, [esi + 0x44]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
push 0
lea eax, [esi + 0x74]
push eax
lea edi, [esi + 0x60]
call ebx
neg eax
sbb eax, eax
and eax, 0x40000000
sub eax, 0xffffff80
push eax
push 0
push edi
call ebx
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 4
push eax
push 0
push 3
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0xa0], eax
cmp eax, 0xffffffff
jne 0x4019aa
xor al, al
pop edi
pop ebp
pop ebx
add esp, 0x10
ret
lea ecx, [esp + 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4019da
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x90], eax
mov dword [esi + 0x94], ecx
mov dword [esi + 0x98], eax
mov dword [esi + 0x9c], ecx
push 0
push edi
call ebx
test eax, eax
jne 0x4019f7
mov edx, dword [esi + 0xa0]
push 2
xor ecx, ecx
push ecx
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x10
ret
Function at 0x401b10
Capabilities:
Create thread

Disassembly:
sub esp, 0xc
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push 1
push 0
call edi
push 0
push 0
push 1
push 0
mov dword [esi + 0xb0], eax
call edi
push 0
push 0
push 0
mov dword [esi + 0xb4], eax
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerW]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov dword [esi + 0xb8], eax
push 0
lea eax, [esi + 0x7c]
push eax
call ebx
test eax, eax
je 0x401bb4
cmp dword [esi + 0xac], 0
je 0x401bb4
cmp dword [esi + 0xb8], 0
je 0x401bb4
push 0
lea edi, [esi + 0x80]
push edi
call ebx
test eax, eax
jne 0x401bb4
mov edx, dword [esi + 0xb8]
push 1
push eax
push eax
push 0x3e8
lea ecx, [esp + 0x18]
push ecx
push edx
mov dword [esp + 0x20], 0xff676980
mov dword [esp + 0x24], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetWaitableTimer]
push 1
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0
push 0
push esi
push 0x401cc0
push 0
push 0
call fcn.0049b14d
add esp, 0x18
pop edi
mov dword [esi + 0xac], eax
pop ebx
add esp, 0xc
ret

Function at 0x401ea0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [edi + 0x98]
mov edx, dword [edi + 0x9c]
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
push 0x401f20
lea esi, [edi + 0x98]
push eax
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0xa0]
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFileEx]
test eax, eax
setne bl
mov byte [esp + 0x14], bl
test bl, bl
jne 0x401ef7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x401f0c
mov byte [esp + 0x14], 1
push 0
push ebp
push edi
mov ebx, esi
call fcn.00401630
mov al, byte [esp + 0x14]
pop esi
pop ebp
pop ebx
ret 8
pop esi
pop ebp
mov al, bl
pop ebx
ret 8
Function at 0x4023a0
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
push edi
mov edi, eax
mov esi, ecx
cmp edi, 0xffffffff
je 0x402491
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
lea eax, [esi + 0x68]
push eax
call ebx
test eax, eax
je 0x4023d9
mov ecx, dword [esi + 0x104]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0
lea eax, [esi + 0x6c]
push eax
call ebx
test eax, eax
je 0x4023f7
mov ecx, dword [esi + 0x104]
mov edx, dword [ecx + 8]
push edx
call fcn.0049bb96
add esp, 4
test edi, edi
jne 0x402412
mov eax, dword [esi + 0x104]
mov eax, dword [eax + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402407
sub eax, edx
mov edi, eax
push 0
lea ecx, [esi + 0x74]
push ecx
call ebx
test eax, eax
je 0x40246a
mov eax, dword [esi + 0x104]
add dword [eax + 8], edi
mov eax, dword [esi + 0x104]
add dword [eax + 0xc], edi
cmp byte [ebp + 8], 0
je 0x40244b
mov edx, dword [esi + 0x104]
cmp dword [edx + 0xc], 0x1f8000
jbe 0x40244b
push esi
call fcn.00402210
push 0
lea eax, [esi + 0x80]
push eax
call ebx
test eax, eax
jne 0x402491
push 1
call fcn.00401a70
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi + 0x104]
push 0
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 0xa0]
mov dword [esp + 0x14], 0
mov eax, dword [edx + 8]
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4047d0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x58
mov ecx, dword [ebx + 4]
push esi
push edi
lea eax, [esp + 0x14]
push eax
push ecx
mov dword [esp + 0x1c], 0x1c
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x24], 0x14000000
call dword [sym.imp.USER32.dll_SetMenuInfo]
mov edx, dword [ebx + 4]
xor esi, esi
push edx
mov dword [esp + 0x34], 0x30
mov dword [esp + 0x10], esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jbe 0x404923
mov ecx, dword [ebx + 4]
lea eax, [esp + 0x30]
push eax
push 1
push esi
push ecx
mov dword [esp + 0x44], 0x102
mov dword [esp + 0x50], 0
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
test eax, eax
je 0x404908
mov eax, dword [esp + 0x40]
cmp eax, 0xffffffff
je 0x404908
mov esi, dword [ebp + 8]
mov dword [esp + 0x10], eax
push eax
lea eax, [esi + 0x78]
call fcn.004043b0
mov edi, eax
test edi, edi
jne 0x404882
mov edx, dword [esi]
mov eax, dword [esp + 0x10]
mov edx, dword [edx + 0x164]
push eax
mov ecx, esi
call edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 6
jae 0x4048ca
test edi, edi
je 0x404908
test dword [esp + 0x38], 0x100
jne 0x404908
mov ecx, dword [esp + 0xc]
mov edx, dword [ebx + 4]
lea eax, [esp + 0x30]
push eax
push 1
push ecx
push edx
mov dword [esp + 0x44], 0x180
mov dword [esp + 0x6c], 0xffffffff
mov dword [esp + 0x48], 0
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
jmp 0x404908
add esi, 0x74
cmp dword [esi], 0
jne 0x4048ef
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push esi
push 0x604a4c
push 1
push 0
push 0x5f9828
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov eax, dword [esp + 0x40]
push eax
mov ecx, ebx
call fcn.004c28e0
push eax
mov eax, dword [esi]
mov edx, edi
call fcn.004046b0
add esp, 8
mov esi, dword [esp + 0xc]
mov ecx, dword [ebx + 4]
inc esi
push ecx
mov dword [esp + 0x10], esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp esi, eax
jb 0x404822
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x406260
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40626a
ret 0xc
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
mov eax, dword [esp + 0x10]
push eax
push ecx
push edx
call fcn.0049ecac
add esp, 0x10
ret 0xc

Function at 0x406290
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40629a
ret 0xc
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
mov eax, dword [esp + 0x10]
push eax
push ecx
push edx
call fcn.0049ee2b
add esp, 0x10
ret 0xc
Function at 0x408830
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 0x408849
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x408884
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x408880
lea ebx, [ebx]
cmp esi, eax
jae 0x408884
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x408870
cmp esi, eax
jb 0x40888a
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 0x409000
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5bff48
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x62ece4]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
lea eax, [esp + 0x14]
xor esi, esi
push eax
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
cmp edi, esi
je 0x4090b7
cmp dword [esp + 0x14], esi
jle 0x4090b0
mov ebx, dword [ebp + 8]
add ebx, 0xb0
lea esp, [esp]
mov ecx, dword [edi + esi*4]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00408c50
lea edx, [esp + 0x18]
push edx
mov ecx, ebx
mov dword [esp + 0x2c], 0
call fcn.004079f0
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4090a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc esi
cmp esi, dword [esp + 0x14]
jl 0x409060
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x409a70
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x5bfcd3
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebp
push esi
push edi
mov eax, dword [0x62ece4]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x2c]
mov ecx, esi
call fcn.00485c33
xor ecx, ecx
mov dword [esp + 0x24], ecx
lea ebp, [esi + 0x10]
mov dword [esi], vtable.CMemDCMy.0
mov dword [ebp + 4], ecx
mov dword [ebp], vtable.CBitmap.0
mov byte [esp + 0x24], 1
xor eax, eax
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x18], ecx
cmp dword [ebx + 0xc], ecx
sete al
mov dword [esi + 0x30], eax
cmp eax, ecx
je 0x409b3b
mov eax, dword [ebx]
mov edx, dword [eax + 0x50]
lea edi, [esi + 0x20]
push edi
mov ecx, ebx
call edx
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
mov ecx, esi
call fcn.0048613d
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
push eax
mov eax, dword [ebx + 4]
push ecx
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
mov ecx, ebp
call fcn.0048640f
test ebp, ebp
je 0x409b19
mov ebp, dword [ebp + 4]
mov ecx, dword [esi + 4]
push ebp
push ecx
call fcn.004864ee
mov edx, dword [esi + 0x24]
mov dword [esi + 0x18], eax
mov eax, dword [edi]
push edx
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
call fcn.00485d4f
jmp 0x409b4d
mov edx, dword [ebx + 0xc]
mov dword [esi + 0xc], edx
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov ecx, dword [ebx + 8]
mov dword [esi + 8], ecx
mov edx, dword [ebx + 8]
push edx
call dword [sym.imp.GDI32.dll_GetBkColor]
push eax
lea eax, [esi + 0x20]
push eax
mov ecx, esi
call fcn.00486bc4
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x18
ret 4