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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe84
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x17c], ecx
mov dword [ebp - 8], ecx
mov esi, eax
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], edx
xor eax, eax
push ebp
push 0x40dd26
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00403888
push 0x27
lea eax, [ebp - 0x72]
push eax
lea eax, [ebp - 0x24]
push eax
call sub.ole32.dll_StringFromGUID2
push 0x40dd3c
lea eax, [ebp - 0x17c]
lea edx, [ebp - 0x72]
mov ecx, 0x27
call fcn.00403b10
push dword [ebp - 0x17c]
push 0x40dd4c
lea eax, [ebp - 8]
mov edx, 3
call fcn.00403c00
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.00403d40
push eax
push 0x80000000
call sub.advapi32.dll_RegOpenKeyA
test eax, eax
jne 0x40dd05
mov dword [ebp - 0x10], 0x104
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x176]
push eax
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueA
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
cmp dword [ebp - 0x14], 0
jne 0x40dd05
cmp byte [ebp - 0x176], 0
je 0x40dd05
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x176]
mov ecx, 0x104
call fcn.00403af8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40dd2d
lea eax, [ebp - 0x17c]
call fcn.00403888
lea eax, [ebp - 8]
call fcn.00403888
ret

Function at 0x40dd5c
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
mov dword [ebp - 4], eax
mov byte [ebp - 5], 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00403d40
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40ddf9
mov eax, dword [ebp - 0x10]
call fcn.00409028
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
mov dword [eax + 5], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 5]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00403d40
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x40ddf9
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], 0x34
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x40de00
mov eax, dword [ebp - 4]
mov eax, dword [eax + 5]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x40ddf9
mov eax, dword [ebp - 4]
add eax, 9
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
call fcn.004054cc
mov byte [ebp - 5], 1
mov al, byte [ebp - 5]
mov esp, ebp
pop ebp
ret
Function at 0x40e3bc
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7c0
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403888
push 0x400
lea eax, [ebp - 0x404]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
lea eax, [ebp - 0x828]
push eax
push 0
lea eax, [ebp - 0x404]
push eax
call sub.KERNEL32.DLL_GetFileAttributesExA
test eax, eax
je 0x40e47f
lea eax, [ebp - 0x840]
push eax
lea eax, [ebp - 0x824]
push eax
call sub.KERNEL32.DLL_FileTimeToSystemTime
test eax, eax
je 0x40e47f
movzx eax, word [ebp - 0x832]
push eax
movzx eax, word [ebp - 0x834]
push eax
movzx eax, word [ebp - 0x836]
push eax
movzx eax, word [ebp - 0x838]
push eax
movzx eax, word [ebp - 0x83a]
push eax
movzx eax, word [ebp - 0x83e]
push eax
movzx eax, word [ebp - 0x840]
push eax
push 0x40e484
lea eax, [ebp - 0x804]
push eax
call sub.msvcrt.dll_sprintf
add esp, 0x24
lea eax, [ebp - 0x804]
call fcn.0040e030
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x804]
mov ecx, 0x400
call fcn.00403af8
mov esp, ebp
pop ebp
ret

Function at 0x40e4a0
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp + 8]
mov dword [edx], 0x67452301
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0xefcdab89
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], 0x98badcfe
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], 0x10325476
pop ebp
ret

Function at 0x1000125c
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0xc], 0
call sub.KERNEL32.DLL_GetEnvironmentStringsA
mov ebx, eax
mov dword [ebp - 0x10], ebx
jmp 0x10001299
cmp byte [ebx], 0x3d
je 0x10001285
inc dword [ebp - 0xc]
mov edi, ebx
xor eax, eax
stc
sbb ecx, ecx
repne scasb al, byte es:[edi]
neg ecx
lea eax, [ecx - 2]
mov edi, eax
inc edi
lea ebx, [ebx + edi]
cmp byte [ebx], 0
jne 0x10001278
mov edi, dword [ebp - 0xc]
inc edi
lea edi, [edi*4]
mov dword [ebp - 0x14], edi
push dword [ebp - 0x14]
call sub.CRTDLL.DLL_malloc
pop ecx
mov dword [ebp - 8], eax
mov dword [0x10003010], eax
cmp dword [ebp - 8], 0
jne 0x100012cc
xor eax, eax
jmp 0x10001342
mov ebx, dword [ebp - 0x10]
jmp 0x10001325
mov edi, ebx
xor eax, eax
stc
sbb ecx, ecx
repne scasb al, byte es:[edi]
neg ecx
lea eax, [ecx - 2]
mov edi, eax
inc edi
mov dword [ebp - 4], edi
cmp byte [ebx], 0x3d
je 0x1000131f
push dword [ebp - 4]
call sub.CRTDLL.DLL_malloc
pop ecx
mov esi, dword [ebp - 8]
mov dword [esi], eax
or eax, eax
jne 0x10001308
jmp 0x10001342
push ebx
mov edi, dword [ebp - 8]
push dword [edi]
call sub.CRTDLL.DLL_strcpy
add esp, 8
add dword [ebp - 8], 4
mov edx, dword [ebp - 4]
lea ebx, [ebx + edx]
cmp byte [ebx], 0
jne 0x100012d1
mov edx, dword [ebp - 8]
mov dword [edx], 0
mov eax, 1
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40498d
Capabilities:
Create thread

Disassembly:
push 0x64
mov eax, 0x408dd0
call fcn.004088af
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov byte [ebp - 4], 2
mov ecx, edx
cmp dword [edx + 0x14], 7
jbe 0x4049c3
mov ecx, dword [edx]
mov eax, dword [edx + 0x10]
inc eax
cmp dword [edx + 0x14], 7
lea eax, [ecx + eax*2]
jbe 0x4049d2
mov edx, dword [edx]
sub eax, edx
lea ecx, [ebp - 0x4c]
push eax
push edx
call fcn.00405686
lea eax, [ebp - 0x4c]
mov edx, edi
push eax
lea ecx, [ebp - 0x58]
call fcn.00404af1
push str.vfprint.dll
mov dword [ebp - 0x5c], ebx
mov esi, fcn.004045e5
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404a38
lea ecx, [ebp - 0x70]
mov byte [ebp - 0x70], bl
push ecx
mov dword [ebp - 0x40], ecx
lea edx, [ebp - 0x40]
push ecx
mov ecx, eax
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], str.kernel32.dll
mov dword [ebp - 0x64], 0x41c018
mov dword [ebp - 0x3c], 0x404bee
call fcn.00406b06
cmp dword [ebp - 0x6c], 0
cmovne esi, dword [ebp - 0x6c]
lea eax, [ebp - 0x5c]
push eax
push ebx
mov ebx, dword [ebp - 0x50]
push ebx
push esi
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
mov dword [ebp - 0x60], esi
test esi, esi
je 0x404ac8
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x404a8f
mov eax, dword [ebp - 0x44]
mov edx, ecx
sub eax, edx
cmp eax, 0x1000
jb 0x404a87
mov ecx, dword [edx - 4]
sub edx, ecx
lea eax, [edx - 4]
cmp eax, 0x1f
jbe 0x404a87
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov edi, dword [ebp - 0x58]
test edi, edi
je 0x404ab1
test ebx, ebx
je 0x404aaf
cmp dword [ebp - 0x54], 0
je 0x404aaf
push 0x8000
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x404abc
push edi
call ebx
push esi
call ebx
xor eax, eax
inc eax
call fcn.00408864
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], str.Could_not_create_thread
push eax
lea ecx, [ebp - 0x38]
call fcn.0040468f
push 0x41d5c0
lea eax, [ebp - 0x38]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x4057ae
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x24
mov eax, 0x408ea0
call fcn.0040887c
mov edi, dword [ebp + 0x10]
mov esi, dword [edi]
mov ebx, dword [edi + 4]
cmp esi, ebx
je 0x4057d9
mov ecx, esi
call fcn.00403499
add esi, 0x18
cmp esi, ebx
jne 0x4057c6
mov eax, dword [edi]
mov dword [edi + 4], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 7
jbe 0x4057e4
mov eax, dword [eax]
lea ecx, [ebp - 0x10]
xor ebx, ebx
push ecx
push 0x20119
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4058e2
mov esi, dword [ebp - 0x10]
push 0xc
call fcn.00407669
pop ecx
mov ecx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x18], eax
mov dword [eax], vtable.appv::utility::scope_guard_func_impl_class_std::_Binder_struct_std::_Unforced__long_int____stdcall___struct_HKEY______struct_HKEY______.0
mov dword [eax + 4], ecx
mov dword [eax + 8], esi
mov dword [ebp - 0x14], eax
mov esi, dword [ebp + 0xc]
mov eax, esi
mov dword [ebp - 4], ebx
mov dword [ebp + 0x10], ebx
cmp dword [esi + 0x14], 7
jbe 0x40583a
mov eax, dword [esi]
lea ecx, [ebp + 0x10]
push ecx
push ebx
lea ecx, [ebp + 8]
push ecx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x4058da
cmp dword [ebp + 8], 1
je 0x405864
cmp dword [ebp + 8], 7
jne 0x4058da
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 1
mov eax, dword [ebp + 0x10]
shr eax, 1
push ecx
add eax, 2
lea ecx, [ebp - 0x24]
push eax
call fcn.00403095
mov byte [ebp - 4], 2
cmp dword [esi + 0x14], 7
jbe 0x405891
mov esi, dword [esi]
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 0x24]
lea eax, [ebp + 8]
push eax
push 0
push esi
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x4058d2
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov eax, dword [ebp - 0x24]
sub ecx, eax
sar ecx, 1
mov word [eax + ecx*2 - 4], dx
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
sub ecx, eax
sar ecx, 1
mov word [eax + ecx*2 - 2], dx
mov edx, edi
mov ecx, dword [ebp - 0x24]
call fcn.0040590c
lea ecx, [ebp - 0x24]
call fcn.00403073
lea ecx, [ebp - 0x14]
call fcn.004019bf
call fcn.00408850
ret 0x10
Function at 0x405be4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x420040]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push pe_nt_image_headers32
push 0
push ebx
mov esi, edx
mov dword [ebp - 0x50], ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test esi, esi
jne 0x405c17
push 0x57
jmp 0x405c8a
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x6c]
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x50]
lea eax, [ebp - 0x6c]
push 0x1c
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x405c8f
push 0
push 0x40
lea eax, [ebp - 0x4c]
push eax
push esi
push edi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x405c8f
mov eax, 0x5a4d
cmp word [ebp - 0x4c], ax
jne 0x405c85
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x60]
ja 0x405c85
cmp eax, 0x40
jb 0x405c85
push 0
push pe_nt_image_headers32
push ebx
add eax, esi
push eax
push edi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x405c8f
cmp dword [ebx], 0x4550
jne 0x405c85
mov eax, dword [ebp - 0x10]
add eax, esi
jmp 0x405c91
push 0xc1
call sub.KERNEL32.dll_SetLastError
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040765c
leave
ret 4
Function at 0x4067e7
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1cc
mov eax, dword [0x420040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1c8], esi
push edi
test esi, esi
jne 0x40682c
push 6
call sub.KERNEL32.dll_SetLastError
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040765c
leave
ret 8
push 4
push 0x1000
push 0x830
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
je 0x406819
and dword [ebp - 0x1c4], 0
lea eax, [ebp - 0xc8]
push 0x40
pop edi
push edi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x8c], edi
mov eax, 0x5a4d
mov word [ebp - 0xc8], ax
lea eax, [ebp - 0x1c4]
push eax
push edi
lea eax, [ebp - 0xc8]
push eax
push ebx
push esi
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x406819
cmp dword [ebp - 0x1c4], edi
jne 0x406819
push pe_nt_image_headers32
lea eax, [ebp - 0x1c0]
add ebx, edi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov dword [ebp - 0x1c0], 0x4550
inc eax
mov dword [ebp - 0x1ac], 0x200000e0
add esp, 0xc
mov word [ebp - 0x1ba], ax
mov eax, 0x10b
mov word [ebp - 0x1a8], ax
lea eax, [ebp - 0x1c4]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x1c0]
push eax
push ebx
push esi
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x406819
mov eax, pe_nt_image_headers32
cmp dword [ebp - 0x1c4], eax
jne 0x406819
and dword [ebp - 0x24], 0
add ebx, eax
and dword [ebp - 8], 0
lea eax, [ebp - 0x1c4]
push eax
push 0x28
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x7465642e
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x28], 0x72756f
push ebx
push esi
movlpd qword [ebp - 0x18], xmm0
movlpd qword [ebp - 0x10], xmm0
mov dword [ebp - 0x20], 0x160
mov dword [ebp - 0x1c], 0x6d0
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x406819
cmp dword [ebp - 0x1c4], 0x28
jne 0x406819
push edi
lea eax, [ebp - 0x88]
add ebx, 0x28
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x88], edi
lea eax, [ebp - 0x1c4]
mov dword [ebp - 0x84], 0x727444
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x7c], 0x6d0
push eax
push edi
lea eax, [ebp - 0x88]
push eax
push ebx
push esi
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x406819
cmp dword [ebp - 0x1c4], edi
jne 0x406819
and dword [ebp - 0x40], 0
lea eax, [ebp - 0x1c4]
add ebx, edi
mov dword [ebp - 0x44], 0x690
mov esi, 0x41c294
lea edi, [ebp - 0x3c]
push eax
push 0x18
lea eax, [ebp - 0x44]
movsd dword es:[edi], dword [esi]
push eax
push ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x1c8]
push esi
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x406819
cmp dword [ebp - 0x1c4], 0x18
jne 0x406819
lea eax, [ebp - 0x1c4]
mov edi, 0x678
push eax
push edi
push dword [ebp - 0x1cc]
add ebx, 0x18
push ebx
push esi
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x406819
cmp dword [ebp - 0x1c4], edi
jne 0x406819
push 0
call sub.KERNEL32.dll_SetLastError
mov eax, ebx
jmp 0x40681b
Function at 0x406b06
Capabilities:
Parse pe header

Disassembly:
push 0x20
push 0x41d478
call fcn.00407c87
mov dword [ebp - 0x1c], edx
mov ebx, ecx
xor esi, esi
test ebx, ebx
jne 0x406b25
push esi
call sub.KERNEL32.dll_GetModuleHandleW
mov ebx, eax
mov dword [ebp - 4], esi
mov eax, 0x5a4d
cmp word [ebx], ax
je 0x406b3c
push 0xc1
jmp 0x406c67
mov edi, dword [ebx + 0x3c]
cmp dword [edi + ebx], 0x4550
je 0x406b52
push 0xbf
jmp 0x406c67
cmp word [edi + ebx + 0x14], si
je 0x406c62
mov edi, dword [edi + ebx + 0x80]
lea eax, [ebx + edi]
neg edi
sbb edi, edi
and edi, eax
mov dword [ebp - 0x30], edi
je 0x406c62
mov edx, dword [edi]
test edx, edx
je 0x406c2e
mov ecx, dword [edi + 0xc]
lea eax, [ebx + ecx]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x20], ecx
je 0x406c62
lea eax, [edx + ebx]
mov dword [ebp - 0x28], eax
mov ecx, dword [edi + 0x10]
lea eax, [ebx + ecx]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ecx]
call fcn.00406a48
push dword [ebp - 0x20]
push eax
push dword [ebp - 0x1c]
mov eax, 0x404b9d
call eax
test eax, eax
je 0x406c2e
mov ecx, esi
mov dword [ebp - 0x24], esi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x406c23
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x406c16
mov dword [ebp - 0x20], esi
mov edx, esi
jns 0x406be5
movzx eax, ax
mov dword [ebp - 0x20], eax
jmp 0x406bf1
lea edx, [eax + 2]
lea eax, [edx + ebx]
neg edx
sbb edx, edx
and edx, eax
mov eax, dword [ebp - 0x2c]
lea eax, [eax + ecx*4]
push eax
push edx
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
mov eax, 0x406c87
call eax
test eax, eax
je 0x406c16
mov ecx, dword [ebp - 0x24]
inc ecx
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x28]
jmp 0x406bcf
push esi
push esi
push esi
push dword [ebp - 0x1c]
mov eax, 0x406c87
call eax
add edi, 0x14
mov dword [ebp - 0x30], edi
jmp 0x406b76
push esi
push esi
push dword [ebp - 0x1c]
mov eax, 0x404b9d
call eax
push esi
call sub.KERNEL32.dll_SetLastError
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
inc eax
jmp 0x406c75
push 0xc0
call sub.KERNEL32.dll_SetLastError
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x407b83
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407bc2
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407bc2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407bc2
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407bc2
cmp dword [ecx + 0x74], 0xe
jbe 0x407bc2
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x41ce90
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 0x41cec1
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cea9
add dl, dl
jne 0x41cecc
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cf1d
xor eax, eax
add dl, dl
jne 0x41ced9
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cfba
add dl, dl
jne 0x41cee8
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cef3
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cefe
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf09
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cf13
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41ceb8
mov eax, 1
add dl, dl
jne 0x41cf2b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf36
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cf22
sub eax, ebx
mov ebx, 1
jne 0x41cf69
mov ecx, 1
add dl, dl
jne 0x41cf4f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cf5a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cf46
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41ceb8
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41cf80
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cf8b
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cf77
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 0x41ceb8
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41cfdb
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 0x41ceb8
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
Function at 0x41efdc
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, edx
xor edx, edx
push ebp
push 0x11254ca
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
mov dword [ebp - 8], edx
mov esi, ebx
xor ecx, ecx
cmp byte [eax + 0x6a], 0
je 0x41f02b
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x88]
test edx, edx
je 0x41f04a
mov ecx, edx
add ecx, ebx
jmp 0x41f04a
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41f04a
mov ecx, edx
add ecx, ebx
test ecx, ecx
je 0x41f0bc
mov esi, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
add eax, ebx
mov dword [ebp - 0x10], eax
mov edi, dword [ecx + 0x20]
add edi, ebx
mov eax, dword [ecx + 0x24]
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
cmp eax, 0xffff
jbe 0x41f0a5
test esi, esi
jbe 0x41f0bc
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088ec
test eax, eax
jne 0x41f097
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41f0bc
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41f074
jmp 0x41f0bc
mov edx, eax
sub edx, dword [ecx + 0x10]
cmp edx, dword [ecx + 0x14]
jae 0x41f0bc
mov eax, edx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x11254d1
ret