joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5066fb
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 0x506742
call fcn.0050b420
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x506742
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x50675e
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.00506273
mov esi, eax
test edi, edi
je 0x50675c
test ebx, ebx
je 0x50675c
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x5076a7
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x5696f0
call fcn.00543b1c
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x5076cc
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x507712
lea ecx, [ebp - 0x10]
call fcn.00401d10
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00506e34
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00401410
mov eax, esi
call fcn.00543bf4
ret 8

Function at 0x519624
Capabilities:
Get file attributes

Disassembly:
mov edi, edi
push esi
mov esi, ecx
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 1
mov ecx, esi
test al, 1
je 0x519648
mov eax, dword [esi]
push 0
call dword [eax + 0x98]
test eax, eax
jne 0x519656
pop esi
ret
mov eax, dword [esi + 0x24]
mov edx, dword [esi]
push eax
call dword [edx + 0x98]
jmp 0x519642
xor eax, eax
inc eax
pop esi
ret

Function at 0x52cab2
Capabilities:
Query or enumerate registry value

Disassembly:
push 0
mov eax, 0x56a415
call fcn.00543b1c
push dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
call fcn.004022b0
and dword [ebp - 4], 0
cmp dword [ebp + 8], 0x80000000
jne 0x52cb14
call fcn.0050acd1
cmp eax, 1
jne 0x52cb14
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push 0x5730a8
push eax
call fcn.00516b2c
add esp, 0xc
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.004060b0
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401410
mov dword [ebp + 8], reloc.WSOCK32.dll_accept
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00401410
mov eax, esi
call fcn.00543bf4
ret 0x10
Function at 0x52cb3d
Capabilities:
Set registry value

Disassembly:
push 0
mov eax, 0x56a415
call fcn.00543b1c
push dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
call fcn.004022b0
and dword [ebp - 4], 0
cmp dword [ebp + 8], 0x80000000
jne 0x52cb9f
call fcn.0050acd1
cmp eax, 1
jne 0x52cb9f
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push 0x5730a8
push eax
call fcn.00516b2c
add esp, 0xc
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.004060b0
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401410
mov dword [ebp + 8], reloc.WSOCK32.dll_accept
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00401410
mov eax, esi
call fcn.00543bf4
ret 0x14

Function at 0x5395ce
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x539616
call fcn.0050b420
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x539616
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x539659
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x539642
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x539642
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x539656
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x53f73f
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5b7b5c]
jne 0x53f749
repz ret
jmp fcn.0054811c
Function at 0x554593
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.00546be2
and dword [ebp - 4], 0
cmp dword [0x5f2610], 0
mov ebx, eax
jne 0x554644
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x5546f5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x5546f5
push eax
call fcn.00546b70
mov dword [esp], 0x593d88
push edi
mov dword [0x5f2610], eax
call esi
push eax
call fcn.00546b70
mov dword [esp], 0x593d74
push edi
mov dword [0x5f2614], eax
call esi
push eax
call fcn.00546b70
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x5f2618], eax
call esi
push eax
call fcn.00546b70
pop ecx
mov dword [0x5f2620], eax
test eax, eax
je 0x554644
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00546b70
pop ecx
mov dword [0x5f261c], eax
mov eax, dword [0x5f261c]
cmp eax, ebx
je 0x55469c
cmp dword [0x5f2620], ebx
je 0x55469c
push eax
call fcn.00546beb
push dword [0x5f2620]
mov esi, eax
call fcn.00546beb
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x55469c
test edi, edi
je 0x55469c
call esi
test eax, eax
je 0x554693
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x554693
test byte [ebp - 0xc], 1
jne 0x55469c
or dword [ebp + 0x10], 0x200000
jmp 0x5546d5
mov eax, dword [0x5f2614]
cmp eax, ebx
je 0x5546d5
push eax
call fcn.00546beb
pop ecx
test eax, eax
je 0x5546d5
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x5546d5
mov eax, dword [0x5f2618]
cmp eax, ebx
je 0x5546d5
push eax
call fcn.00546beb
pop ecx
test eax, eax
je 0x5546d5
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5f2610]
call fcn.00546beb
pop ecx
test eax, eax
je 0x5546f5
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x5546f7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40130f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401369
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40135b
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp + 8]
lea ecx, [esi + eax]
and edx, 0xf
jbe 0x401357
cmp esi, ecx
jae 0x40135b
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edx, 1
jne 0x401345
cmp esi, ecx
jb 0x40135f
xor eax, eax
jmp 0x401368
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x40189f
Capabilities:
Delete directory
Delete file

Disassembly:
push edi
mov edi, ecx
cmp dword [edi + 0xc], 0x8004ffff
je 0x4018e6
push esi
xor esi, esi
cmp dword [edi + 0x14], esi
je 0x4018cc
push ebx
push esi
lea ecx, [edi + 0x10]
call fcn.0040264e
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
inc esi
cmp esi, dword [edi + 0x14]
jne 0x4018b4
pop ebx
lea ecx, [edi + 0x10]
call fcn.00402678
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [edi + 0x1c]
call fcn.004028e2
pop esi
lea ecx, [edi + 0x20]
call fcn.00402c2e
lea ecx, [edi + 0x1c]
call fcn.00402c2e
lea ecx, [edi + 0x10]
call fcn.00402678
lea ecx, [edi + 8]
call fcn.00402c2e
lea ecx, [edi + 4]
pop edi
jmp fcn.00402c2e
Function at 0x401d67
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
mov dword [ebp - 4], ecx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401d95
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x401d95
xor al, al
jmp 0x401e10
call fcn.00401432
push eax
lea ecx, [ebp + 8]
call fcn.00402c49
or dword [ebp - 8], 0xffffffff
lea eax, [ebp + 8]
push 0x104
mov ecx, eax
mov dword [ebp - 0x10], eax
call fcn.004028aa
push eax
push ebx
push 0x41ca34
push dword [edi]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [ebp - 0x10]
mov edi, eax
call fcn.00402884
test edi, edi
je 0x401e06
cmp edi, 0x6f
je 0x401e06
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x401e06
mov ecx, dword [ebp - 4]
lea eax, [ebp + 8]
push eax
add ecx, 0x1c
call fcn.004027ae
mov bl, 1
lea ecx, [ebp + 8]
call fcn.00402c2e
mov al, bl
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x401e18
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push edi
mov edi, ecx
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x401e2f
xor al, al
jmp 0x401e9d
push ebx
push esi
call fcn.00401432
push eax
lea ecx, [ebp - 4]
call fcn.00402c49
or dword [ebp - 8], 0xffffffff
lea eax, [ebp - 4]
push 0x104
mov ecx, eax
mov dword [ebp - 0x10], eax
call fcn.004028aa
push eax
xor ebx, ebx
mov dword [ebp - 0xc], eax
push ebx
push ebx
push 0x26
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp - 0x10]
mov esi, eax
call fcn.00402884
test esi, esi
js 0x401e91
lea eax, [ebp - 4]
mov ecx, edi
push eax
call fcn.00401d67
test al, al
je 0x401e91
lea eax, [ebp - 4]
push eax
lea ecx, [edi + 0x20]
call fcn.004027ae
mov bl, 1
lea ecx, [ebp - 4]
call fcn.00402c2e
pop esi
mov al, bl
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x401f21
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x41e018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x210]
push ebx
push eax
mov edi, ecx
or esi, 0xffffffff
call fcn.00405ea0
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push ebx
push 0x41ca3c
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x40201e
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x214]
call fcn.00402841
lea eax, [ebp - 0x214]
push eax
lea ecx, [edi + 0x10]
call fcn.004026ae
lea ecx, [ebp - 0x214]
call fcn.00402c2e
push 0x41c944
push 0x66
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x40201e
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40201e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40201e
xor eax, eax
push eax
push eax
push 4
push eax
push eax
push 0xc0000000
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40201e
push esi
push ebx
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, eax
mov ecx, edi
call fcn.004022de
pop ecx
test eax, eax
jne 0x402014
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40201e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004059e8
mov esp, ebp
pop ebp
ret
Function at 0x4022de
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x41e018]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x9c], eax
push edi
mov edi, ecx
cmp esi, 0xd
jae 0x40230e
or eax, 0xffffffff
jmp 0x40249b
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0x4022c2
push eax
xor ebx, ebx
mov dword [ebp - 0x90], 0x4022d0
push ecx
mov edx, edi
mov dword [ebp - 0x68], ebx
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x6c], ebx
call fcn.00404cd8
xor eax, eax
mov dword [ebp - 0x58], ebx
inc eax
mov dword [ebp - 0x34], ebx
add edi, 5
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
sub esi, 0xd
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x50], ebx
mov eax, dword [edi]
push eax
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x80], esi
call fcn.00413c54
add esp, 0xc
mov dword [ebp - 0x84], ebx
mov edi, eax
lea eax, [ebp - 0x84]
mov edx, edi
push eax
push ecx
lea eax, [ebp - 0x80]
push eax
mov eax, dword [ebp - 0x88]
lea ecx, [ebp - 0x7c]
add eax, 8
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00404b79
add esp, 0x14
mov esi, eax
lea eax, [ebp - 0x94]
push dword [ebp - 0x6c]
push eax
call dword [ebp - 0x90]
push dword [ebp - 0x68]
lea eax, [ebp - 0x94]
mov dword [ebp - 0x6c], ebx
push eax
call dword [ebp - 0x90]
add esp, 0x10
mov dword [ebp - 0x68], ebx
test esi, esi
je 0x4023dd
or ebx, 0xffffffff
jmp 0x402492
mov edx, dword [edi]
lea ecx, [edi + 4]
mov eax, dword [ecx]
push 4
pop esi
add ecx, esi
mov dword [ebp - 0x98], eax
push edx
mov dword [ebp - 0x80], edx
mov eax, dword [ecx]
add ecx, esi
mov dword [ebp - 0x88], eax
mov eax, dword [ecx]
add ecx, esi
mov dword [ebp - 0x8c], eax
mov ebx, dword [ecx]
add ecx, esi
mov dword [ebp - 0x84], ecx
call fcn.00413c54
mov edx, dword [ebp - 0x88]
mov esi, eax
pop ecx
push dword [ebp - 0x80]
mov ecx, dword [ebp - 0x8c]
push esi
push ebx
mov ebx, dword [ebp - 0x98]
lea eax, [ecx + edx]
add eax, ebx
add eax, dword [ebp - 0x84]
push eax
push ecx
mov ecx, dword [ebp - 0x84]
lea eax, [edx + ebx]
add eax, ecx
push eax
push edx
lea eax, [ebx + ecx]
mov edx, ebx
push eax
call fcn.00404d4c
add esp, 0x20
xor ebx, ebx
test eax, eax
je 0x402461
inc ebx
jmp 0x40248b
push ebx
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0x80]
push esi
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402488
mov eax, dword [ebp - 0x80]
cmp dword [ebp - 0xa0], eax
je 0x40248b
or ebx, 0xffffffff
push esi
call fcn.00413a22
pop ecx
push edi
call fcn.00413a22
pop ecx
mov eax, ebx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004059e8
mov esp, ebp
pop ebp
ret
Function at 0x403001
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
mov esi, ecx
call fcn.0040309e
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x403094
push edi
push edi
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 8], eax
test eax, eax
je 0x40308d
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
mov dword [esi + 0xc], edx
test edx, edx
je 0x403084
push 6
pop ecx
mov dword [ebp - 0x1c], edi
xor eax, eax
lea edi, [ebp - 0x18]
rep stosd dword es:[edi], eax
push 0x1c
lea ecx, [ebp - 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403084
mov ecx, dword [ebp - 0x10]
mov al, 1
mov dword [esi + 0x10], ecx
jmp 0x403096
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.0040309e
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x403239
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ecx + 0x10]
cmp esi, 0x40
jae 0x403249
xor eax, eax
jmp 0x40329e
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x403245
mov edx, dword [ecx + 0x3c]
lea eax, [edx + 0xf8]
cmp esi, eax
jb 0x403245
cmp dword [edx + ecx], 0x4550
jne 0x403245
movzx eax, word [edx + ecx + 4]
push edi
mov edi, 0x14c
cmp ax, di
je 0x403286
mov edi, 0x8664
cmp ax, di
je 0x40329b
lea eax, [ecx + 0x98]
add eax, edx
mov ecx, dword [eax]
test ecx, ecx
je 0x40329b
add ecx, 0xc
cmp esi, ecx
jae 0x40329d
xor eax, eax
pop edi
pop esi
pop ebp
ret 4
Function at 0x4032a3
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x40228
call fcn.004139f0
mov eax, dword [0x41e018]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x40218]
xor ebx, ebx
mov dword [ebp - 0x40214], 1
push ebx
push eax
mov esi, ecx
lea eax, [ebp - 0x4020c]
push 0x200
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4034b3
cmp dword [ebp - 0x40218], 0x200
jne 0x4034b3
push 4
lea eax, [ebp - 0x4010b]
push 0x41ca90
push eax
call fcn.00413da7
add esp, 0xc
test eax, eax
jne 0x403324
inc eax
mov byte [edi], al
jmp 0x4034b5
push 5
lea eax, [ebp - 0x4010b]
push str.ustar
push eax
call fcn.00413da7
add esp, 0xc
test eax, eax
jne 0x4034b3
mov ecx, dword [esi + 4]
sub ecx, 0x10
call fcn.00402c72
add eax, 0x10
lea ecx, [ebp - 0x40210]
push 0x41cac4
mov dword [ebp - 0x40210], eax
call fcn.004034c8
lea eax, [ebp - 0x4020c]
push eax
lea ecx, [ebp - 0x40210]
call fcn.004034c8
push ebx
push 0x100
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x40210]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x40224], eax
cmp eax, 0xffffffff
je 0x4034a4
push 8
lea eax, [ebp - 0x40190]
push ebx
push eax
call fcn.0040d152
add esp, 0xc
mov dword [ebp - 0x40220], eax
push 1
push ebx
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x40220]
mov edi, ecx
neg edi
add eax, ecx
and edi, 0x1ff
add edi, eax
test ecx, ecx
je 0x403452
mov eax, 0x40000
mov dword [ebp - 0x4021c], eax
cmp ecx, eax
jae 0x4033f5
mov eax, ecx
mov dword [ebp - 0x4021c], ecx
push ebx
lea ecx, [ebp - 0x40218]
push ecx
push eax
lea eax, [ebp - 0x4000c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40344c
push ebx
lea eax, [ebp - 0x40218]
push eax
push dword [ebp - 0x4021c]
lea eax, [ebp - 0x4000c]
push eax
push dword [ebp - 0x40224]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40344c
mov ecx, dword [ebp - 0x40220]
sub ecx, dword [ebp - 0x4021c]
mov dword [ebp - 0x40220], ecx
jne 0x4033de
jmp 0x403452
mov byte [ebp - 0x40214], bl
push dword [ebp - 0x40224]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x40214], bl
je 0x40348e
cmp byte [esi + 8], bl
je 0x40347a
lea eax, [ebp - 0x40210]
push eax
lea ecx, [esi + 0xc]
call fcn.004026ae
mov eax, dword [esi + 0x18]
test eax, eax
je 0x40348e
push dword [ebp - 0x40210]
push dword [esi + 0x1c]
call eax
pop ecx
pop ecx
cmp edi, 0xffffffff
je 0x40349e
push ebx
push ebx
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov bl, byte [ebp - 0x40214]
lea ecx, [ebp - 0x40210]
call fcn.00402c2e
mov al, bl
jmp 0x4034b5
xor al, al
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004059e8
mov esp, ebp
pop ebp
ret 4
Function at 0x403521
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov ecx, dword [ecx]
push ebx
push esi
push edi
sub ecx, 0x10
mov dword [ebp - 8], edx
call fcn.00402c72
push 0x44
xor ebx, ebx
push ebx
lea esi, [eax + 0x10]
lea eax, [ebp - 0x5c]
mov dword [ebp - 4], esi
push eax
call fcn.00405ea0
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
or dword [ebp - 0x30], 0x81
xor eax, eax
inc eax
mov word [ebp - 0x2c], ax
cmp dword [esi - 4], eax
jle 0x403582
push dword [esi - 0xc]
lea ecx, [ebp - 4]
call fcn.00402dc9
mov esi, dword [ebp - 4]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push ebx
push ebx
push 0x400
push ebx
push ebx
push ebx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4035ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
jmp 0x4035e3
push 0xffffffffffffffff
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 8]
test eax, eax
je 0x4035d0
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
setne bl
jmp 0x4035d3
xor ebx, ebx
inc ebx
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
lea ecx, [ebp - 4]
call fcn.00402c2e
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x100a8008], 0x8088405
inc edx
mov dword [ebx + 0x100a8008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41d2ec
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41d31d
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d305
add dl, dl
jne 0x41d328
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d379
xor eax, eax
add dl, dl
jne 0x41d335
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d416
add dl, dl
jne 0x41d344
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d34f
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d35a
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d365
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41d36f
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41d314
mov eax, 1
add dl, dl
jne 0x41d387
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41d392
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41d37e
sub eax, ebx
mov ebx, 1
jne 0x41d3c5
mov ecx, 1
add dl, dl
jne 0x41d3ab
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41d3b6
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41d3a2
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41d314
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41d3dc
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41d3e7
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41d3d3
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41d314
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41d437
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 0x41d314
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret