joyce8/EMBER2024-capa huggingface dataset:
Function at 0x460870
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x4608b9
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x460d30
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x48b8b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.004608e0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.00460960
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.00460960
lea ecx, [esi + 0xc]
call fcn.0047df9a
lea ecx, [esi + 0x10]
call fcn.0047df9a
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.00461ef0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.00461ef0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.00461ef0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.0047e00f
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.0047e00f
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x4709ba
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4b410c]
jne 0x4709c4
repz ret
jmp fcn.00479102

Function at 0x478044
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.0046af3e
and dword [ebp - 4], 0
cmp dword [0x4cfe2c], 0
mov ebx, eax
jne 0x4780f5
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4781a6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x49b7e8
push edi
call esi
test eax, eax
je 0x4781a6
push eax
call fcn.0046aecc
mov dword [esp], 0x49b7d8
push edi
mov dword [0x4cfe2c], eax
call esi
push eax
call fcn.0046aecc
mov dword [esp], 0x49b7c4
push edi
mov dword [0x4cfe30], eax
call esi
push eax
call fcn.0046aecc
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x4cfe34], eax
call esi
push eax
call fcn.0046aecc
pop ecx
mov dword [0x4cfe3c], eax
test eax, eax
je 0x4780f5
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0046aecc
pop ecx
mov dword [0x4cfe38], eax
mov eax, dword [0x4cfe38]
cmp eax, ebx
je 0x47814d
cmp dword [0x4cfe3c], ebx
je 0x47814d
push eax
call fcn.0046af47
push dword [0x4cfe3c]
mov esi, eax
call fcn.0046af47
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x47814d
test edi, edi
je 0x47814d
call esi
test eax, eax
je 0x478144
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x478144
test byte [ebp - 0xc], 1
jne 0x47814d
or dword [ebp + 0x10], 0x200000
jmp 0x478186
mov eax, dword [0x4cfe30]
cmp eax, ebx
je 0x478186
push eax
call fcn.0046af47
pop ecx
test eax, eax
je 0x478186
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x478186
mov eax, dword [0x4cfe34]
cmp eax, ebx
je 0x478186
push eax
call fcn.0046af47
pop ecx
test eax, eax
je 0x478186
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4cfe2c]
call fcn.0046af47
pop ecx
test eax, eax
je 0x4781a6
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4781a8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4803b3
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4803eb
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0047e46a
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0047e442
jmp 0x4803f7
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4
Function at 0x481aa8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x481aea
call fcn.0048781e
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x481aea
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x481ae1
xor eax, eax
jmp 0x481af2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00481af8
pop edi
pop esi
pop ebx
ret 4

Function at 0x487d4e
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x487d7c
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x487d9a
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00487cb4
jmp 0x487d9a
mov eax, dword [esi + 0x14]
test eax, eax
je 0x487d9a
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00487cb4
test edi, edi
mov eax, edi
jne 0x487d84
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x8ac058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x8ac1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x8ac07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x8ac06a
add dl, dl
jne 0x8ac089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x8ac0dc
xor eax, eax
add dl, dl
jne 0x8ac096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x8ac17d
add dl, dl
jne 0x8ac0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x8ac0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x8ac0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x8ac0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x8ac0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x8ac075
mov eax, 1
add dl, dl
jne 0x8ac0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x8ac0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x8ac0e1
sub eax, ebx
mov ebx, 1
jne 0x8ac128
mov ecx, 1
add dl, dl
jne 0x8ac10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x8ac119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x8ac105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x8ac075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x8ac13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x8ac14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x8ac136
cmp eax, 0x7d00
jae 0x8ac16d
cmp eax, 0x500
jb 0x8ac168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x8ac075
cmp eax, 0x7f
ja 0x8ac170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x8ac075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x8ac19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x8ac075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x348b335a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
pushal
call 0x348b3369
pop dword [ebp - 0x38]
mov eax, 0x511a4c94
add eax, 0xe370e6d5
sub dword [ebp - 0x38], eax
mov dword [ebp - 0x48], 0x87a0754f
add dword [ebp - 0x48], 0xc6b1cffc
mov dword [ebp - 0x44], 0x2d683b8
sub dword [ebp - 0x44], 0xd0a33773
mov dword [ebp - 0x40], 0x4cbc7292
sub dword [ebp - 0x40], 0x702e64
mov dword [ebp - 0x3c], 0x6e1ee0e9
sub dword [ebp - 0x3c], 0x6e1ee0e9
lea eax, [ebp - 0x48]
push eax
mov eax, 0x33045b6b
sub eax, 0xfe7b4a1f
add eax, dword [ebp - 0x38]
call dword [eax]
mov dword [ebp - 0x48], 0x91fd090d
sub dword [ebp - 0x48], 0x1d8a9fb7
mov dword [ebp - 0x44], 0x22b334e
add dword [ebp - 0x44], 0x3f412e27
mov dword [ebp - 0x40], 0xb5b3bdb5
sub dword [ebp - 0x40], 0x52445149
mov dword [ebp - 0x3c], 0x603aa93f
add dword [ebp - 0x3c], 0x9fc556c1
lea ebx, [ebp - 0x48]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x38]
call dword [eax]
push 0x40
push 0x1000
push 0x38b45
push 0
call eax
mov ecx, 0x4e16
mov edx, eax
mov esi, 0x4ba72132
add esi, 0xe8e7cece
add esi, dword [ebp - 0x38]
mov ebx, 0xf21133fa
mov dword [ebp - 0x28], 0xe5631a9
mov edi, dword [esi]
xor dword [ebp - 0x14], 0x70b592e6
sub edi, ebx
xor dword [ebp - 0x30], 0x540de3d3
mov dword [edx], edi
add dword [ebp - 0x20], 0x7cdc8c2f
add edx, 0x413e8591
sub edx, 0x413e858d
add esi, 0x7cd68cb9
add esi, 0x8329734b
loop 0x348b347a
add eax, 0x8faefce1
sub eax, 0x8fadd1b6
mov ebx, eax
add eax, 5
mov ecx, 0x75ff7306
sub ecx, 0x41767306
add ecx, dword [ebp - 0x38]
call ebx
leave
ret
Function at 0x401000
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, str.VMSnap3
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ebx, dword [esp + 0x34]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, ebx
push 0x40bba4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00401c10
push ebx
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebx, eax
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401067
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret 0x10
mov esi, dword [esp + 0x2c]
push esi
call fcn.004011a0
mov ecx, dword [esp + 0x38]
push ecx
push esi
call fcn.00401200
test eax, eax
jne 0x401089
pop edi
pop esi
pop ebx
add esp, 0x1c
ret 0x10
push 0x6d
push esi
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
lea edx, [esp + 0x14]
push 0
push edx
mov esi, eax
call edi
test eax, eax
je 0x4010f1
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
push ebp
mov ebp, dword [sym.imp.USER32.dll_TranslateMessage]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x10]
push eax
push esi
push ecx
call ebx
test eax, eax
jne 0x4010db
lea edx, [esp + 0x10]
push edx
call ebp
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
lea ecx, [esp + 0x18]
push 0
push ecx
call edi
test eax, eax
jne 0x4010b8
mov ebx, dword [esp + 0x38]
pop ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, dword [esp + 0xc]
pop ebx
add esp, 0x1c
ret 0x10

Function at 0x401240
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
push esi
test eax, eax
push edi
mov dword [esp + 8], 1
je 0x4012a7
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x4012a7
mov esi, dword [esp + 0x18]
test esi, esi
je 0x4012a7
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4012a7
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0xc]
push edi
push ecx
push 0
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x10
pop edi
xor eax, eax
pop esi
pop ecx
ret 0x10
Function at 0x4012b0
Capabilities:
Create process on windows
Create process suspended

Disassembly:
sub esp, 0x454
push ebx
push esi
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov dword [esp + 0xc], eax
or ecx, 0xffffffff
mov dword [esp + 0x10], eax
mov edi, 0x4080a0
mov dword [esp + 0x14], eax
lea edx, [esp + 0x60]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x60]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x1c], 0x44
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x464]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x60]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40809c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x60]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x468]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0xc]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
lea edx, [esp + 0x7c]
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
neg eax
sbb eax, eax
pop edi
pop esi
pop ebx
neg eax
add esp, 0x454
ret 8
Function at 0x402bf0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407188
push 0x404d38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x40c5a0], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40c59c], ecx
shl ecx, 8
add ecx, edx
mov dword [0x40c598], ecx
shr eax, 0x10
mov dword [0x40c594], eax
call fcn.00404cf0
test eax, eax
jne 0x402c5a
push 0x1c
call fcn.00402dc0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00404af0
call fcn.00404ae0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40daf4], eax
call fcn.004044a0
mov dword [0x40c57c], eax
test eax, eax
je 0x402c8d
mov eax, dword [0x40daf4]
test eax, eax
jne 0x402c97
push 0xffffffffffffffff
call fcn.00402e70
add esp, 4
call fcn.004041f0
call fcn.00404100
call fcn.00402e40
mov esi, dword [0x40daf4]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x402d76
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x402cde
test al, al
je 0x402cde
and eax, 0xff
push eax
call fcn.004040a0
add esp, 4
test eax, eax
je 0x402cb8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402cb8
cmp byte [esi], 0x22
jne 0x402ce7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x402cf7
cmp al, 0x20
ja 0x402cf7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402ce7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x402d18
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x402d1d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00402e70
jmp 0x402d5b
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x402ce7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402d76

Function at 0x402dc0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40c584], 1
jne 0x402dce
call fcn.00404e10
mov eax, dword [esp + 4]
push eax
call fcn.00404e50
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x402eb0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40c5d0]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x402ecf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x40c5cc], 1
mov byte [0x40c5c8], bl
jne 0x402f29
mov ecx, dword [0x40daec]
test ecx, ecx
je 0x402f17
mov esi, dword [0x40dae8]
sub esi, 4
cmp esi, ecx
jb 0x402f17
mov eax, dword [esi]
test eax, eax
je 0x402f10
call eax
mov ecx, dword [0x40daec]
sub esi, 4
cmp esi, ecx
jae 0x402f02
push 0x408020
push 0x408018
call fcn.00402f60
add esp, 8
push 0x40802c
push 0x408024
call fcn.00402f60
add esp, 8
test ebx, ebx
jne 0x402f50
push ebp
mov dword [0x40c5d0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x4044a0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40c720]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x4044e2
call edi
mov esi, eax
test esi, esi
je 0x4044cc
mov eax, 1
jmp 0x4044dd
call ebp
mov ebx, eax
test ebx, ebx
je 0x4045ef
mov eax, 2
mov dword [0x40c720], eax
cmp eax, 1
jne 0x404582
test esi, esi
jne 0x4044fb
call edi
mov esi, eax
test esi, esi
je 0x4045ef
cmp word [esi], 0
mov eax, esi
je 0x404515
add eax, 2
cmp word [eax], 0
jne 0x404503
add eax, 2
cmp word [eax], 0
jne 0x404503
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x404574
push edi
call fcn.00402f80
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x404574
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x404566
push ebx
call fcn.00402df0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x4045ef
test ebx, ebx
jne 0x404593
call ebp
mov ebx, eax
test ebx, ebx
je 0x4045ef
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4045ab
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40459b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40459b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00402f80
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4045cd
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x404e50
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x408448
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x404e74
add eax, 8
inc ebp
cmp eax, 0x4084d8
jb 0x404e65
cmp ecx, dword [ebp*8 + 0x408448]
jne 0x40501b
mov eax, dword [0x40c584]
cmp eax, 1
je 0x404fdd
test eax, eax
jne 0x404ea0
cmp dword [0x408170], 1
je 0x404fdd
cmp ecx, 0xfc
je 0x40501b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x404edb
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x404f24
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x407594
add ebx, ecx
push ebx
call fcn.00403e10
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x407574
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40844c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00406570
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x40d9e0]
test eax, eax
je 0x404fee
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x404ff8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40844c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x1061e058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1061e1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x1061e07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1061e06a
add dl, dl
jne 0x1061e089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1061e0dc
xor eax, eax
add dl, dl
jne 0x1061e096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1061e17d
add dl, dl
jne 0x1061e0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1061e0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1061e0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1061e0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x1061e0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x1061e075
mov eax, 1
add dl, dl
jne 0x1061e0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1061e0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1061e0e1
sub eax, ebx
mov ebx, 1
jne 0x1061e128
mov ecx, 1
add dl, dl
jne 0x1061e10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1061e119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1061e105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1061e075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1061e13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1061e14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1061e136
cmp eax, 0x7d00
jae 0x1061e16d
cmp eax, 0x500
jb 0x1061e168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1061e075
cmp eax, 0x7f
ja 0x1061e170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1061e075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x1061e19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x1061e075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10