joyce8/EMBER2024-capa huggingface dataset:
Function at 0x517930
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x2dc
mov eax, 0x58e6f8
push ebx
push ebp
push esi
xor esi, esi
test eax, eax
push edi
je 0x517ad0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x517ad0
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x7e]
mov word [esp + 0x7c], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0xe2]
mov word [esp + 0xe0], si
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x2f0]
mov dword [esp + 0x14], esi
cmp eax, esi
jle 0x517ad0
mov ebp, dword [sym.imp.MSVCRT.dll_time]
mov esi, dword [sym.imp.MSVCRT.dll_gmtime]
xor ebx, ebx
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x7c]
rep stosd dword es:[edi], eax
mov ecx, 0x19
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push ecx
call ebp
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x14]
sub eax, ebx
push edx
mov dword [esp + 0x18], eax
call esi
add esp, 8
test eax, eax
je 0x517a19
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
inc edx
push ecx
add eax, 0x76c
push edx
push eax
push str._d_02d_02d
lea ecx, [esp + 0x8c]
push 0x31
push ecx
call fcn.0042dce0
add esp, 0x18
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x10]
add eax, 0x15180
push edx
mov dword [esp + 0x14], eax
call esi
add esp, 4
test eax, eax
je 0x517a5a
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
inc edx
push ecx
add eax, 0x76c
push edx
push eax
push str._d_02d_02d
lea ecx, [esp + 0x28]
push 0x31
push ecx
call fcn.0042dce0
add esp, 0x18
lea edx, [esp + 0x18]
lea eax, [esp + 0x7c]
push edx
push eax
push 0x58e6f8
push str._sHistory.IE5MSHist01_s_s
lea ecx, [esp + 0xf0]
push 0x104
push ecx
call fcn.0042dd50
add esp, 0x18
lea edx, [esp + 0xe0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x517ac0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2f0]
inc eax
add ebx, 0x15180
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x5179b9
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2dc
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2dc
ret
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2dc
ret
Function at 0x518fc0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x5580f0
mov dword [ebp - 4], ecx
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov edi, eax
add esp, 8
test edi, edi
mov dword [ebp + 8], edi
je 0x5190fe
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push edi
call ebx
push edi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push edi
mov esi, eax
call ebx
add esp, 0x1c
test esi, esi
je 0x5190f4
lea eax, [esi + 1]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5190f4
lea ecx, [esi + 1]
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 8]
push eax
push 1
push esi
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
je 0x5190e8
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x10b]
mov byte [ebp - 0x10c], 0
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x10c]
push 0x104
push ecx
mov ecx, dword [ebp - 4]
push esi
push ebx
call fcn.00518e80
test eax, eax
je 0x5190e8
lea edx, [ebp - 0x10c]
test edx, edx
jne 0x519098
xor edi, edi
jmp 0x5190d1
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.0051c5a0
mov edi, esp
push esi
push edi
lea ecx, [ebp - 0x10c]
push 0xffffffffffffffff
push ecx
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push edi
dec edx
push 0x5384a4
push edx
push eax
call fcn.0042dd50
add esp, 0x10
push ebx
call fcn.0051c54a
mov edi, dword [ebp + 8]
add esp, 4
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea esp, [ebp - 0x118]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x519120
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x5580f0
mov dword [ebp - 4], ecx
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x519266
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push ebx
call edi
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push ebx
mov esi, eax
call edi
add esp, 0x1c
cmp esi, 0x1a8
jle 0x51925c
lea edi, [esi + 1]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp + 8], esi
je 0x51925c
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push 1
push 0x1a8
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
je 0x519253
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x10b]
mov byte [ebp - 0x10c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x10c]
push 0x104
push eax
push 0x1a8
push esi
call fcn.00518e80
test eax, eax
je 0x519253
lea ecx, [ebp - 0x10c]
test ecx, ecx
jne 0x519200
xor edi, edi
jmp 0x51923c
lea edx, [ebp - 0x10c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.0051c5a0
mov edi, esp
push esi
push edi
lea eax, [ebp - 0x10c]
push 0xffffffffffffffff
push eax
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push edi
dec ecx
push 0x5384a4
push ecx
push edx
call fcn.0042dd50
add esp, 0x10
push esi
call fcn.0051c54a
add esp, 4
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea esp, [ebp - 0x118]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x519280
Capabilities:
Check if file exists
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x218
push ebx
push esi
mov ebx, ecx
push edi
xor esi, esi
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], si
push str.ie8ver.dll
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x22c]
lea ecx, [esp + 0x1c]
push eax
push 0x53a058
push 0x104
push ecx
mov dword [esp + 0x24], esi
call fcn.0042dce0
add esp, 0x14
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x5193c7
lea eax, [esp + 0x18]
push eax
call fcn.004ad5f0
add esp, 4
test eax, eax
je 0x5193c7
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, esi
mov dword [esp + 0xc], edi
je 0x5193c7
push ebp
push 0x56b634
push str.IE8VER.INI
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebp, eax
cmp ebp, esi
je 0x5193af
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
push ebp
push edi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
test esi, esi
mov ebp, eax
je 0x5193af
test ebp, ebp
je 0x5193af
lea esi, [ebp + 1]
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebx], edi
je 0x5193ab
mov ecx, esi
xor eax, eax
mov edx, ecx
mov esi, dword [esp + 0x18]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0x1f21bc
and ecx, 3
push ebp
rep stosb byte es:[edi], al
mov edi, dword [ebx]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
push ecx
call fcn.0041e270
mov edx, dword [ebx]
lea esi, [ebx + 4]
push edx
push esi
call fcn.00495480
mov eax, dword [esi]
add esp, 0x14
test eax, eax
je 0x5193ab
mov dword [esp + 0x14], 1
mov edi, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x218
ret 4
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x218
ret 4
Function at 0x5193e0
Capabilities:
Get file size

Disassembly:
sub esp, 0x624
xor eax, eax
push ebx
mov ebx, ecx
push ebp
push esi
mov ecx, dword [ebx + 4]
push edi
test ecx, ecx
je 0x519572
mov ebp, dword [esp + 0x63c]
mov ecx, 0x82
lea edi, [esp + 0x12]
mov word [esp + 0x10], ax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x638]
push ebp
push eax
push 0x53a058
lea ecx, [esp + 0x1c]
push 0x104
push ecx
call fcn.0042dce0
add esp, 0x14
lea edx, [esp + 0x10]
push 0
push 0x80
push 4
push 0
push 1
push SysReAllocStringLen
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x519570
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x519570
cmp edi, 0xffffffff
je 0x519570
mov eax, dword [ebx + 4]
push 0
push 0x537b44
push ebp
push eax
call fcn.00496460
add esp, 0x10
cmp edi, eax
jne 0x519570
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x42a]
mov word [esp + 0x428], 0
rep stosd dword es:[edi], eax
mov ecx, 0x82
lea edi, [esp + 0x21e]
mov word [esp + 0x21c], ax
push 0x104
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x644]
test eax, eax
je 0x51950c
mov edx, dword [ebx + 4]
lea ecx, [esp + 0x220]
push ecx
push str.head
push ebp
push edx
call fcn.00496270
add esp, 0x14
lea eax, [esp + 0x428]
lea ecx, [esp + 0x10]
push 0x104
push eax
push ecx
mov ecx, ebx
call fcn.00519120
jmp 0x51953f
mov eax, dword [ebx + 4]
lea edx, [esp + 0x220]
push edx
push 0x56b654
push ebp
push eax
call fcn.00496270
add esp, 0x14
lea ecx, [esp + 0x428]
lea edx, [esp + 0x10]
push 0x104
push ecx
push edx
mov ecx, ebx
call fcn.00518fc0
lea eax, [esp + 0x21c]
push 0x104
lea ecx, [esp + 0x42c]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCmpNW]
test eax, eax
jne 0x519570
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x624
ret 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x624
ret 0xc
Function at 0x51b5c8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x529f50
push 0x51c60e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
cmp word [ecx], 0x5a4d
jne 0x51b64e
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
je 0x51b626
xor al, al
or dword [ebp - 4], 0xffffffff
jmp 0x51b654
mov edx, dword [eax + 0xd8]
lea esi, [edx + ecx]
cmp dword [ebp + 0xc], esi
jb 0x51b61e
mov eax, dword [eax + 0xdc]
add eax, edx
add eax, ecx
cmp dword [ebp + 0xc], eax
jae 0x51b61e
mov al, 1
jmp 0x51b620
or dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x51b6b3
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push esi
mov esi, dword [0x59aa34]
test esi, esi
je 0x51b6d7
lea eax, [esp + 4]
push eax
push 0x40
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [esi + 4]
jmp 0x51b6bb
pop esi
pop ecx
ret

Function at 0x51b6da
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x59aa40], eax
je 0x51b6f0
mov eax, 0x10dd
pop ecx
ret
push ebx
push esi
mov esi, dword [0x59aa50]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x51b73d
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebx
jne 0x51b72e
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x51b72e
push eax
call fcn.0051b7a4
pop ecx
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call fcn.0051c54a
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x51b6ff
mov dword [0x59aa50], ebx
call fcn.0051b77d
mov esi, dword [0x59aa4c]
cmp esi, ebx
je 0x51b76a
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call fcn.0051c54a
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x51b752
pop edi
mov dword [0x59aa4c], ebx
mov dword [0x59aa40], ebx
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x51ba27
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x59aa44]
push esi
test eax, eax
push edi
jne 0x51ba91
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 0xc]
cmp edi, eax
je 0x51ba8f
push 8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
pop ecx
test esi, esi
jne 0x51ba53
push 8
pop edi
jmp 0x51ba6e
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x51ba7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.0051c54a
pop ecx
and dword [0x59aa48], 0
mov dword [0x59aa44], edi
mov eax, edi
jmp 0x51ba91
mov dword [esi + 4], edi
mov eax, dword [0x59aa4c]
mov dword [esi], eax
mov dword [0x59aa4c], esi
xor eax, eax
pop edi
pop esi
ret 4
Function at 0x51bd4e
Capabilities:
Allocate or change rwx memory
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
cmp esi, 0x7ff80000
mov ebx, 0x10000
jbe 0x51bd72
lea eax, [esi - 0x7ff80000]
mov dword [ebp + 8], eax
jmp 0x51bd75
mov dword [ebp + 8], ebx
cmp esi, 0x80000000
jae 0x51bd88
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x51bd8f
mov dword [ebp - 4], 0xfff80000
mov eax, dword [0x59aa38]
mov ecx, dword [0x59aa34]
test eax, eax
jne 0x51bda9
test ecx, ecx
je 0x51bdbe
mov eax, ecx
mov dword [0x59aa38], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x51bdbe
cmp edx, dword [ebp + 8]
jb 0x51bdbe
cmp edx, dword [ebp - 4]
jbe 0x51bf17
mov eax, ecx
test ecx, ecx
mov dword [0x59aa38], eax
je 0x51bdee
test eax, eax
je 0x51bde2
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x51bde2
cmp ecx, dword [ebp + 8]
jb 0x51bde2
cmp ecx, dword [ebp - 4]
jbe 0x51bf17
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x59aa38], eax
jne 0x51bdcd
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, dword [ebp + 8]
mov edi, esi
jbe 0x51be56
cmp edi, 0x70000000
jb 0x51be13
cmp edi, 0x80000000
ja 0x51be13
mov edi, 0x6fff0000
lea eax, [ebp - 0x20]
push 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x51be56
cmp dword [ebp - 0x10], ebx
jne 0x51be2e
cmp dword [ebp - 0x14], ebx
jae 0x51be3e
mov eax, dword [ebp - 0x1c]
lea edi, [eax - 0x10000]
cmp edi, dword [ebp + 8]
ja 0x51bdfe
jmp 0x51be56
push 0x40
push 0x3000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x59aa38], eax
jne 0x51becd
cmp esi, dword [ebp - 4]
jae 0x51bf3e
cmp esi, 0x70000000
jb 0x51be74
cmp esi, 0x80000000
ja 0x51be74
mov esi, 0x80010000
lea eax, [ebp - 0x20]
push 0x1c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x51bf3e
cmp dword [ebp - 0x10], ebx
jne 0x51bec2
cmp dword [ebp - 0x14], ebx
jb 0x51bec2
mov ecx, esi
and ecx, 0xffff
je 0x51beaa
mov eax, ebx
sub eax, ecx
sub dword [ebp - 0x14], eax
add dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x20]
push 0x40
push 0x3000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x59aa38], eax
jne 0x51becd
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
lea esi, [eax + ecx]
jmp 0x51be56
mov dword [eax], 0x52727464
mov eax, dword [0x59aa38]
xor ecx, ecx
mov dword [eax + 8], ecx
mov eax, dword [0x59aa38]
mov edx, dword [0x59aa34]
mov dword [eax + 4], edx
mov eax, dword [0x59aa38]
mov dword [0x59aa34], eax
add eax, 0xffe0
mov edx, 0x7fd
mov dword [eax + 0x18], ecx
mov ecx, eax
sub eax, 0x20
dec edx
jne 0x51beff
mov eax, dword [0x59aa38]
mov dword [eax + 8], ecx
mov eax, dword [0x59aa38]
mov esi, dword [eax + 8]
cmp esi, dword [ebp + 8]
jb 0x51bf3e
cmp esi, dword [ebp - 4]
ja 0x51bf3e
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, esi
jmp 0x51bf40
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x51bf45
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x529f60
push 0x51c60e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x51bfba
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x34]
cmp word [ecx], 0x5a4d
jne 0x51bfb6
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
jne 0x51bfb6
cmp word [eax + 0x14], 0
jne 0x51bfab
xor eax, eax
or dword [ebp - 4], 0xffffffff
jmp 0x51bfbc
mov eax, ecx
jmp 0x51bfa5
or dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x51bfcb
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x59aa40], eax
je 0x51bfea
mov eax, 0x10dd
jmp 0x51c0c0
mov eax, dword [0x59aa44]
test eax, eax
jne 0x51c0c0
mov edi, dword [ebp + 8]
test edi, edi
jne 0x51c006
push 6
pop eax
jmp 0x51c0c0
cmp dword [edi], 0
jne 0x51c018
push 6
pop eax
mov dword [0x59aa44], eax
jmp 0x51c0ba
push 0x18
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
pop ecx
test esi, esi
jne 0x51c02b
push 8
pop edi
jmp 0x51c0a4
mov edi, dword [edi]
push 0
push dword [ebp + 0xc]
call fcn.0051b560
movzx ecx, byte [edi + 0x17]
mov ebx, dword [edi + 0x18]
xor edx, edx
sub ebx, ecx
cmp ecx, edx
je 0x51c099
cmp ecx, 0x17
ja 0x51c099
cmp dword [edi + 0x1c], eax
jne 0x51c099
lea eax, [ebp - 4]
mov dword [ebp - 4], edx
push eax
push 0x40
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x51c06f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x51c0a4
mov eax, dword [ebp + 8]
mov dword [esi + 4], 1
mov dword [esi + 8], eax
mov dword [esi + 0x10], edi
mov dword [esi + 0xc], ebx
mov eax, dword [ebp - 4]
mov dword [esi + 0x14], eax
mov eax, dword [0x59aa50]
mov dword [esi], eax
mov dword [0x59aa50], esi
xor eax, eax
jmp 0x51c0c0
cmp dword [0x59aa3c], edx
push 9
pop edi
jne 0x51c0aa
mov dword [0x59aa44], edi
test esi, esi
je 0x51c0b5
push esi
call fcn.0051c54a
pop ecx
mov eax, edi
mov edi, dword [ebp + 8]
mov dword [0x59aa48], edi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x41cd64
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 0x41cd95
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cd7d
add dl, dl
jne 0x41cda0
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cdf1
xor eax, eax
add dl, dl
jne 0x41cdad
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41ce8e
add dl, dl
jne 0x41cdbc
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdc7
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdd2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cddd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cde7
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cd8c
mov eax, 1
add dl, dl
jne 0x41cdff
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41ce0a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdf6
sub eax, ebx
mov ebx, 1
jne 0x41ce3d
mov ecx, 1
add dl, dl
jne 0x41ce23
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce2e
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce1a
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd8c
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41ce54
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce5f
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce4b
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 0x41cd8c
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41ceaf
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 0x41cd8c
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 0x41e5a4
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], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x47aa63
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e655
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e63e
test esi, esi
jbe 0x41e655
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088e4
test eax, eax
jne 0x41e630
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 0x41e655
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e60d
jmp 0x41e655
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e655
mov eax, ecx
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 0x47aa6a
ret