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

Disassembly:
push 0xffffffffffffffff
push 0x50d760
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x580b30]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov edi, dword [esp + 0x54]
cmp dword [edi + 0x14], 8
mov esi, dword [esp + 0x58]
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x1c], esi
jb 0x4bb50c
mov eax, dword [edi]
jmp 0x4bb50e
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4bb52c
push esi
push edi
push ebp
call fcn.004bacb0
add esp, 0xc
jmp 0x4bb67f
test ebx, 0x400
je 0x4bb63b
cmp dword [edi + 0x14], 8
jb 0x4bb542
mov edx, dword [edi]
jmp 0x4bb544
mov edx, edi
xor eax, eax
mov word [esp + 0x20], ax
mov eax, edx
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], 0
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bb560
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x28]
call fcn.0040acb0
cmp dword [esp + 0x34], 8
mov eax, dword [esp + 0x20]
mov dword [esp + 0x48], 0
jae 0x4bb591
lea eax, [esp + 0x20]
push 0
push 0x2000000
push 3
push 0
push 7
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x14], esi
cmp dword [esp + 0x34], 8
mov byte [esp + 0x48], 2
jb 0x4bb5c6
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00469e1a
add esp, 4
xor edx, edx
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], 0
mov word [esp + 0x20], dx
cmp esi, 0xffffffff
jne 0x4bb5f6
mov eax, dword [esp + 0x1c]
push eax
push edi
push ebp
call fcn.004bacb0
add esp, 0xc
jmp 0x4bb67f
push edi
call fcn.004b98b0
add esp, 4
test al, al
jne 0x4bb628
push ebx
push edi
call fcn.004b9d60
add esp, 8
push esi
mov dword [ebp], 9
mov dword [ebp + 4], eax
mov dword [esp + 0x4c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4bb67f
push esi
mov dword [esp + 0x4c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4bb64d
mov dword [esi], 0
call fcn.004be240
mov dword [esi + 4], eax
push ebx
push edi
mov dword [esp + 0x1c], 3
test bl, 0x10
jne 0x4bb664
mov dword [esp + 0x1c], 2
call fcn.004b9d60
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
add esp, 8
mov dword [ebp], ecx
mov dword [ebp + 4], edx
mov eax, ebp
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004d31b7
add esp, 0x38
ret
Function at 0x4bb960
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x50d8d8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x580b30]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0x7c]
mov dword fs:[0], eax
mov edi, dword [esp + 0x8c]
cmp dword [edi + 0x14], 8
mov esi, dword [esp + 0x90]
jb 0x4bb9aa
mov eax, dword [edi]
jmp 0x4bb9ac
mov eax, edi
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4bb9cf
cmp esi, ebx
je 0x4bb9c8
mov dword [esi], ebx
call fcn.004be240
mov dword [esi + 4], eax
mov al, 1
jmp 0x4bba76
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov dword [esp + 0x14], ebx
call fcn.004be240
mov dword [esp + 0x18], eax
cmp ebp, 0xb7
jne 0x4bba1a
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push edi
push ecx
call fcn.004bb4c0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
add esp, 0xc
mov dword [esp + 0x20], edx
cmp ecx, 3
jne 0x4bba1a
cmp esi, ebx
je 0x4bba74
mov dword [esi], ebx
call fcn.004be240
jmp 0x4bba71
cmp esi, ebx
jne 0x4bba6a
push 0x23
push str.boost::filesystem::create_directory
lea ecx, [esp + 0x2c]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
call fcn.0040a3b0
mov dword [esp + 0x84], ebx
call fcn.004be240
push eax
push ebp
push edi
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x50]
call fcn.004ba8b0
push 0x54e8cc
lea ecx, [esp + 0x44]
push ecx
call fcn.004d6828
call fcn.004be240
mov dword [esi], ebp
mov dword [esi + 4], eax
xor al, al
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004d31b7
add esp, 0x74
ret

Function at 0x4c15e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x50e138
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x10], esi
mov edi, dword [esp + 0x24]
push edi
call fcn.004d331f
mov dword [esi], vtable.boost::system::system_error.0
mov eax, dword [edi + 0xc]
mov dword [esi + 0xc], eax
mov ecx, dword [edi + 0x10]
xor ebx, ebx
mov dword [esi + 0x10], ecx
push 0xffffffffffffffff
lea ecx, [esi + 0x14]
push ebx
add edi, 0x14
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push edi
mov dword [esp + 0x28], ebx
mov byte [ecx], bl
call fcn.0040a000
mov dword [esi + 0x30], vtable.boost::exception.0
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], 0xffffffff
mov dword [esi], vtable.boost::exception_detail::error_info_injector_class_boost::lock_error_.1.0
mov dword [esi + 0x30], vtable.boost::exception_detail::error_info_injector_class_boost::lock_error_.0
mov eax, esi
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 4
Function at 0x4c1ad0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x50e210
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
mov edi, dword [esp + 0x20]
push edi
call fcn.004d331f
mov dword [esi], vtable.boost::system::system_error.0
mov eax, dword [edi + 0xc]
mov dword [esi + 0xc], eax
mov ecx, dword [edi + 0x10]
mov dword [esi + 0x10], ecx
push 0xffffffffffffffff
lea ecx, [esi + 0x14]
push 0
lea edx, [edi + 0x14]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push edx
mov dword [esp + 0x24], 0
mov byte [ecx], 0
call fcn.0040a000
mov dword [esi], vtable.boost::lock_error.0
mov dword [esi + 0x30], vtable.boost::exception.0
mov ecx, dword [edi + 0x34]
mov dword [esp + 0x18], 1
mov dword [esi + 0x34], ecx
test ecx, ecx
je 0x4c1b64
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
mov eax, dword [edi + 0x38]
mov dword [esi + 0x38], eax
mov ecx, dword [edi + 0x3c]
mov dword [esi + 0x3c], ecx
mov edx, dword [edi + 0x40]
mov dword [esi + 0x40], edx
mov dword [esi], vtable.boost::exception_detail::error_info_injector_class_boost::lock_error_.1.0
mov dword [esi + 0x30], vtable.boost::exception_detail::error_info_injector_class_boost::lock_error_.0
mov eax, esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x10
ret 4
Function at 0x4c1fa0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x50e568
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov eax, dword [0x579558]
cmp eax, 0xffffffff
jne 0x4c1fd5
xor esi, esi
jmp 0x4c1fde
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov dword [esp + 0x14], esi
mov ebp, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esp + 0x24], 0
test esi, esi
je 0x4c2025
cmp dword [esi + 0x1c], 0
jne 0x4c2067
cmp dword [esi + 0xc], 0
jne 0x4c2070
push 0x4bf090
push 0x58ac50
call fcn.004bf420
mov eax, dword [0x579558]
add esp, 8
cmp eax, 0xffffffff
je 0x4c2025
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esp + 0x24], 0xffffffff
test esi, esi
je 0x4c2053
lea edx, [esi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x4c2053
mov edx, dword [esi]
mov eax, dword [edx]
push 0
mov ecx, esi
call eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
cmp dword [esi + 0xc], 0
je 0x4c20b0
lea ecx, [ecx]
mov ebx, dword [esi + 0xc]
mov eax, dword [ebx + 4]
mov dword [esi + 0xc], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x4c209e
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebx]
mov edx, dword [edi]
mov eax, dword [edx]
push 0
mov ecx, edi
call eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
cmp dword [esi + 0xc], 0
jne 0x4c2070
cmp dword [esi + 0x1c], 0
je 0x4c1ffa
lea ebx, [ebx]
mov ecx, dword [esi + 0x18]
mov edi, dword [ecx]
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x4c20db
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4c20db
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esi + 0x14]
call fcn.0044d370
cmp dword [esi + 0x1c], 0
jne 0x4c20c0
jmp 0x4c1ff4

Function at 0x4c2190
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push edi
mov edi, ecx
mov eax, dword [edi]
lea ecx, [eax + 0x10]
push ecx
push 4
push eax
push 0x4c2100
push 0
push 0
call fcn.004d57cb
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4c21b9
pop edi
xor al, al
pop ebx
ret
mov edx, dword [edi]
push esi
add edx, 4
mov eax, 1
lock xadd dword [edx], eax
mov esi, dword [edi]
mov eax, dword [esi + 8]
test eax, eax
je 0x4c21dd
cmp eax, 0xffffffff
je 0x4c21dd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], ebx
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop esi
pop edi
mov al, 1
pop ebx
ret
Function at 0x4c5520
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x50e768
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
push 0
push 1
lea ecx, [esp + 0x14]
call fcn.004c5660
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], vtable.boost::serialization::typeid_system::extended_type_info_typeid_arg.0
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], 0
call sym.NVNetworkService.exe__get_instance___singleton_V__multiset_PBVextended_type_info_typeid_0_typeid_system_serialization_boost__U
mov esi, eax
lea edx, [esp + 0x2c]
lea ecx, [esp + 0xc]
push edx
lea eax, [esp + 0xc]
mov dword [esp + 0x30], ecx
push eax
mov ecx, esi
call fcn.004c5150
mov esi, dword [esi + 4]
mov eax, dword [esp + 8]
mov dword [esp + 0x24], 0xffffffff
lea ecx, [esp + 0xc]
cmp esi, eax
jne 0x4c55ca
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], vtable.boost::serialization::typeid_system::extended_type_info_typeid_0.0
call fcn.004c5680
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x20
ret 4
mov esi, dword [eax + 0xc]
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], vtable.boost::serialization::typeid_system::extended_type_info_typeid_0.0
call fcn.004c5680
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x20
ret 4
Function at 0x4c8830
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x50eb1b
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x580b30]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
mov edx, dword [esp + 0xc0]
mov esi, dword [esp + 0xc4]
cmp edx, esi
je 0x4c89ab
xor ebx, ebx
lea eax, [ebx + 1]
mov cl, byte [edx]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], 0x10100
mov dword [esp + 0x3c], 0x1010101
mov dword [esp + 0x40], 0x1010101
mov dword [esp + 0x44], 0x101
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], 0x1010100
mov dword [esp + 0x50], 0x1010101
mov dword [esp + 0x54], 0x1010101
mov dword [esp + 0x58], 0x1010101
mov dword [esp + 0x5c], 0x1010101
mov dword [esp + 0x60], 0x1010101
mov dword [esp + 0x64], 0x10101
mov dword [esp + 0x68], 0x1000000
mov dword [esp + 0x6c], 0x1010100
mov dword [esp + 0x70], 0x1010101
mov dword [esp + 0x74], 0x1010101
mov dword [esp + 0x78], 0x1010101
mov dword [esp + 0x7c], 0x1010101
mov dword [esp + 0x80], 0x1010101
mov dword [esp + 0x84], 0x10101
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ebx
cmp cl, 0x7f
ja 0x4c89a1
movsx ecx, cl
cmp byte [esp + ecx + 0xc], bl
je 0x4c89d8
add edx, eax
cmp edx, esi
jne 0x4c8884
mov al, byte [esp + 0xc8]
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.004d31b7
add esp, 0xb0
ret
push eax
push ebx
push ebx
push 2
lea ecx, [esp + 0x1c]
call fcn.00508480
push eax
mov dword [esp + 0xbc], ebx
call fcn.004c8150
int3

Function at 0x4d14a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x50fa16
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x580b30]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
push 0x10
mov dword [esp + 0xc], 0
call fcn.00469def
mov esi, eax
add esp, 4
mov dword [esp + 8], esi
mov dword [esp + 0x14], 0
test esi, esi
je 0x4d14f8
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
push eax
mov ecx, esi
call fcn.004cd310
mov eax, esi
jmp 0x4d14fa
xor eax, eax
mov esi, dword [esp + 0x1c]
lea ecx, [esi + 4]
mov dword [esi], eax
mov dword [ecx], 0
push ecx
push eax
push esi
mov dword [esp + 0x20], 1
call fcn.004cf3e0
mov cl, byte [esp + 0x30]
add esp, 0xc
mov byte [esi + 8], cl
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret
Function at 0x4d31b7
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x580b30]
jne 0x4d31c1
repz ret
jmp fcn.004dde73

Function at 0x4ee2c4
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x580b30]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004df992
and dword [ebp - 0x14], 0
cmp dword [0x58bc74], 0
mov dword [ebp - 0x18], eax
jne 0x4ee377
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x4ee41f
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x4ee41f
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x58bc74], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x58bc78], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x58bc7c], eax
call edi
push eax
call esi
mov dword [0x58bc84], eax
test eax, eax
je 0x4ee377
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x58bc80], eax
mov eax, dword [0x58bc80]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x4ee3d0
cmp dword [0x58bc84], ecx
je 0x4ee3d0
push eax
call esi
push dword [0x58bc84]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x4ee3d0
test ebx, ebx
je 0x4ee3d0
call edi
test eax, eax
je 0x4ee3c7
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4ee3c7
test byte [ebp - 8], 1
jne 0x4ee3d0
or dword [ebp + 0x10], 0x200000
jmp 0x4ee403
mov eax, dword [0x58bc78]
cmp eax, dword [ebp - 0x18]
je 0x4ee403
push eax
call esi
test eax, eax
je 0x4ee403
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4ee403
mov eax, dword [0x58bc7c]
cmp eax, dword [ebp - 0x18]
je 0x4ee403
push eax
call esi
test eax, eax
je 0x4ee403
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x58bc74]
call esi
test eax, eax
je 0x4ee41f
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x4ee421
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d31b7
leave
ret
Function at 0x4f3880
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push esi
mov esi, edx
test esi, esi
not eax
je 0x4f38b2
lea esp, [esp]
test cl, 3
je 0x4f38b2
movzx edx, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x52ef28]
add ecx, 1
sub esi, 1
jne 0x4f3890
cmp esi, 0x20
push ebx
push edi
jb 0x4f3a9c
mov edi, esi
shr edi, 5
xor eax, dword [ecx]
add ecx, 4
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x52f328]
xor edx, dword [ebx*4 + 0x52f728]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x52ef28]
add ecx, 4
xor edx, dword [eax*4 + 0x52fb28]
add ecx, 4
xor edx, dword [ecx - 8]
add ecx, 4
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x52f328]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x52f728]
mov ebx, edx
and edx, 0xff
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x52ef28]
add ecx, 4
xor eax, dword [edx*4 + 0x52fb28]
add ecx, 4
xor eax, dword [ecx - 0x10]
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x52f328]
xor edx, dword [ebx*4 + 0x52f728]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x52ef28]
xor edx, dword [eax*4 + 0x52fb28]
xor edx, dword [ecx - 0xc]
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x52f328]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x52f728]
mov ebx, edx
and edx, 0xff
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x52ef28]
xor eax, dword [edx*4 + 0x52fb28]
xor eax, dword [ecx - 8]
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x52f328]
xor edx, dword [ebx*4 + 0x52f728]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x52ef28]
xor edx, dword [eax*4 + 0x52fb28]
xor edx, dword [ecx - 4]
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x52f328]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x52f728]
mov ebx, edx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x52ef28]
and edx, 0xff
xor eax, dword [edx*4 + 0x52fb28]
xor eax, dword [ecx]
add ecx, 4
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x52f328]
xor edx, dword [ebx*4 + 0x52f728]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x52ef28]
add ecx, 4
xor edx, dword [eax*4 + 0x52fb28]
sub esi, 0x20
xor edx, dword [ecx - 4]
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x52f328]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x52f728]
mov ebx, edx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x52ef28]
and edx, 0xff
xor eax, dword [edx*4 + 0x52fb28]
sub edi, 1
jne 0x4f38c2
cmp esi, 4
jb 0x4f3ae9
mov edx, esi
shr edx, 2
xor eax, dword [ecx]
add ecx, 4
mov edi, eax
shr edi, 0x10
and edi, 0xff
mov edi, dword [edi*4 + 0x52f328]
movzx ebx, ah
xor edi, dword [ebx*4 + 0x52f728]
mov ebx, eax
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x52ef28]
and eax, 0xff
xor edi, dword [eax*4 + 0x52fb28]
sub esi, 4
sub edx, 1
mov eax, edi
jne 0x4f3aa6
test esi, esi
pop edi
pop ebx
je 0x4f3b0d
nop
movzx edx, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x52ef28]
add ecx, 1
sub esi, 1
jne 0x4f3af0
not eax
pop esi
ret
Function at 0x402ec0
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402efd
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402f1d
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.004052cc
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x4030fc
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x403155
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetCommandLineA
lea edx, [ebp - 8]
call fcn.00402f98
mov dword [ebp - 4], eax
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00402f98
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
je 0x40313f
inc ebx
jmp 0x403128
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40315c
lea eax, [ebp - 8]
call fcn.0040504c
ret

Function at 0x403164
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.0040504c
test esi, esi
jne 0x40319b
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.0040513c
jmp 0x4031bc
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402f98
mov dword [esp], eax
test esi, esi
je 0x4031bc
cmp dword [ebx], 0
je 0x4031bc
dec esi
jmp 0x4031a3
add esp, 0x10c
pop esi
pop ebx
ret

Function at 0x4038c8
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x403f88
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x5ea024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x404020
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404000
xor eax, eax
push ebp
push 0x403ff9
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x40403c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404000
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x5ea024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x5ea024], ax
mov esp, ebp
pop ebp
ret
Function at 0x404e44
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x5ff04c], 0
je 0x404ea5
cmp word [0x5ff220], 0xd7b2
jne 0x404e6d
cmp dword [0x5ff228], 0
jbe 0x404e6d
mov eax, 0x5ff21c
call dword [0x5ff238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x5ea074
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404ecc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x5ea034], 0
jne 0x404ec1
push 0
push 0x5ea06c
push 0x5ea074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x405000
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402ca8
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x5ff04d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404fc8
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc