joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40690b
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x24
mov eax, 0x42668b
call fcn.0041461b
mov esi, ecx
mov dword [ebp - 0x20], esi
mov eax, dword [esi + 0x60]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x5c]
mov dword [ebp - 0x18], eax
call fcn.0040cfc5
mov edi, dword [eax + 0xc]
xor ebx, ebx
cmp dword [esi + 0x58], ebx
je 0x406956
call fcn.0040cfc5
mov edi, dword [eax + 0xc]
push 5
push dword [esi + 0x58]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], ebx
je 0x406967
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], ebx
jne 0x406974
or eax, 0xffffffff
jmp 0x406ad0
mov ecx, esi
call fcn.0040645d
mov dword [ebp - 0x14], eax
call fcn.004092d0
and dword [ebp - 0x28], ebx
cmp dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
je 0x4069f2
call dword [sym.imp.USER32.dll_GetDesktopWindow]
cmp dword [ebp - 0x14], eax
je 0x4069f2
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x4069f2
push 0
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x2c], 1
call fcn.00405b40
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x24], ebx
je 0x4069f2
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x120]
test eax, eax
je 0x4069f2
mov ecx, ebx
call fcn.0040bf15
test eax, eax
je 0x4069f2
push 0
mov ecx, ebx
call fcn.0040bf30
mov dword [ebp - 0x28], 1
and dword [ebp - 4], 0
push esi
call fcn.0040ac1f
push dword [ebp - 0x14]
call fcn.00409228
push edi
push eax
push dword [ebp - 0x1c]
mov ecx, esi
call fcn.00406713
xor edi, edi
cmp eax, edi
je 0x406a4f
test byte [esi + 0x3c], 0x10
je 0x406a39
push 4
pop edi
mov ecx, esi
call fcn.0040be55
test ax, 0x100
je 0x406a2f
push 5
pop edi
push edi
mov ecx, esi
call fcn.00408d99
xor edi, edi
cmp dword [esi + 0x20], edi
je 0x406a4f
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.0040bf97
or dword [ebp - 4], 0xffffffff
jmp 0x406a7a
cmp dword [ebp - 0x28], edi
je 0x406a88
push 1
mov ecx, ebx
call fcn.0040bf30
cmp dword [ebp - 0x2c], edi
je 0x406a98
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x406ab1
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x20]
jne 0x406ab1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
mov ecx, esi
call fcn.00406497
cmp dword [esi + 0x58], edi
je 0x406acd
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [esi + 0x44]
call fcn.00414687
ret
Function at 0x40bd39
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x14], edi
mov ebp, ecx
je 0x40bd7c
call fcn.0040cfc5
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x40bd7c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40bd97
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push ebx
mov ecx, ebp
call fcn.0040b8f3
test ebx, ebx
mov esi, eax
je 0x40bd95
test edi, edi
je 0x40bd95
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x40d4f1
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x432c20]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0x800
push ebx
push esi
mov esi, ecx
mov ebx, edx
lea eax, [ebp - 0xc]
jne 0x40d52e
push 0x429940
push 4
push eax
call fcn.00413958
push eax
call fcn.00401cc0
add esp, 0x10
jmp 0x40d540
push 4
push eax
push 3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40d5ab
push edi
call fcn.00414849
mov edi, dword [eax]
call fcn.00414849
and dword [eax], 0
lea eax, [ebp - 0xc]
push eax
push ebx
push esi
push 0x111
mov esi, 0x112
lea eax, [ebp - 0x230]
push esi
push eax
call fcn.004147ef
add esp, 0x18
mov ebx, eax
call fcn.00414849
cmp dword [eax], 0
je 0x40d58b
call fcn.00414849
push dword [eax]
call fcn.00405e6e
pop ecx
jmp 0x40d592
call fcn.00414849
mov dword [eax], edi
cmp ebx, 0xffffffff
pop edi
je 0x40d5ab
cmp ebx, esi
jae 0x40d5ab
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
jmp 0x40d5ad
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00413430
leave
ret
Function at 0x410bd0
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x410bfe
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x410c1c
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00410b3a
jmp 0x410c1c
mov eax, dword [esi + 0x14]
test eax, eax
je 0x410c1c
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00410b3a
test edi, edi
mov eax, edi
jne 0x410c06
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x436080]
test ecx, ecx
je 0x410cdf
jmp 0x410bcf
ret 8

Function at 0x413430
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x432c20]
jne 0x41343a
repz ret
jmp fcn.00417e26

Function at 0x416c4b
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x432dc0]
je 0x416c66
inc edi
cmp edi, 0x17
jb 0x416c57
cmp edi, 0x17
jae 0x416de6
push ebp
push 3
call fcn.0041eda0
cmp eax, 1
pop ecx
je 0x416db2
push 3
call fcn.0041eda0
test eax, eax
pop ecx
jne 0x416c9a
cmp dword [0x432bfc], 1
je 0x416db2
cmp ebx, 0xfc
je 0x416de5
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x436338
push ebp
call fcn.0041ed3b
add esp, 0xc
test eax, eax
je 0x416cd0
push esi
push esi
push esi
push esi
push esi
call fcn.0041829f
add esp, 0x14
push 0x104
mov esi, 0x436351
push esi
push 0
mov byte [0x436455], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x416d14
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0041ed3b
add esp, 0xc
test eax, eax
je 0x416d14
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0041829f
add esp, 0x14
push esi
call fcn.0041ecb0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x416d59
push esi
call fcn.0041ecb0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x43664c
push 0x42acbc
sub ecx, eax
push ecx
push eax
call fcn.0041ebf0
add esp, 0x14
test eax, eax
je 0x416d59
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0041829f
add esp, 0x14
jmp 0x416d5b
xor esi, esi
push 0x42acb8
push ebx
push ebp
call fcn.0041eb7f
add esp, 0xc
test eax, eax
je 0x416d7b
push esi
push esi
push esi
push esi
push esi
call fcn.0041829f
add esp, 0x14
push dword [edi*8 + 0x432dc4]
push ebx
push ebp
call fcn.0041eb7f
add esp, 0xc
test eax, eax
je 0x416d9d
push esi
push esi
push esi
push esi
push esi
call fcn.0041829f
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0041e9c2
add esp, 0xc
jmp 0x416de5
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x416de5
cmp ebp, 0xffffffff
je 0x416de5
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x432dc4]
push dword [esi]
call fcn.0041ecb0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x41e9c2
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004177fb
xor ebx, ebx
cmp dword [0x436e38], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x41ea98
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x41eb78
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x41eb78
push eax
call fcn.0041778d
mov dword [esp], 0x42afd8
push edi
mov dword [0x436e38], eax
call esi
push eax
call fcn.0041778d
mov dword [esp], 0x42afc4
push edi
mov dword [0x436e3c], eax
call esi
push eax
call fcn.0041778d
mov dword [0x436e40], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0041625f
test eax, eax
pop ecx
pop ecx
je 0x41ea66
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0041829f
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x41ea98
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0041778d
cmp eax, ebx
pop ecx
mov dword [0x436e48], eax
je 0x41ea98
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0041778d
pop ecx
mov dword [0x436e44], eax
mov eax, dword [0x436e44]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x41eb1d
cmp dword [0x436e48], ecx
je 0x41eb1d
push eax
call fcn.00417804
push dword [0x436e48]
mov esi, eax
call fcn.00417804
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x41eb1d
cmp edi, ebx
je 0x41eb1d
call esi
cmp eax, ebx
je 0x41eaea
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x41eaea
test byte [ebp - 0x18], 1
jne 0x41eb1d
lea eax, [ebp - 0x10]
push eax
call fcn.00416296
test eax, eax
pop ecx
je 0x41eb05
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0041829f
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x41eb14
or dword [ebp + 0x10], 0x200000
jmp 0x41eb58
or dword [ebp + 0x10], 0x40000
jmp 0x41eb58
mov eax, dword [0x436e3c]
cmp eax, dword [ebp - 8]
je 0x41eb58
push eax
call fcn.00417804
cmp eax, ebx
pop ecx
je 0x41eb58
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x41eb58
mov eax, dword [0x436e40]
cmp eax, dword [ebp - 8]
je 0x41eb58
push eax
call fcn.00417804
cmp eax, ebx
pop ecx
je 0x41eb58
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x436e38]
call fcn.00417804
cmp eax, ebx
pop ecx
je 0x41eb78
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x41eb7a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42625e
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x432c20]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.004261f3
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.004148c0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x4262ad
cmp dword [ebp - 0x1c], 5
jb 0x4262c5
jmp 0x4262c1
cmp dword [ebp - 0x10], 1
jne 0x4262c5
cmp dword [ebp - 0x1c], 4
ja 0x4262c1
jne 0x4262c5
cmp dword [ebp - 0x18], 0
jbe 0x4262c5
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x42c214
call fcn.004260c7
test eax, eax
jge 0x4262e6
mov byte [0x436fdc], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00413430
add ebp, 0x78
leave
ret
Function at 0x402a9a
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
pushal
call 0x402aa0
pop ebp
sub ebp, 0x702d1082
jmp 0x402b5a
mov eax, dword fs:[0x30]
mov al, byte [eax + 2]
and eax, 0xff
je 0x402b72
mov eax, 1
int3
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x1c]
lodsd eax, dword [esi]
mov edx, dword [eax + 0x20]
lea ebx, [ebp + 0x702d1f54]
mov cx, word [eax + 0x1c]
cmp cx, 0x18
je 0x402b9e
cmp cx, 0x1c
jne 0x402bc5
lea ebx, [ebp + 0x702d1f72]
push eax
mov al, byte [edx]
xor al, byte [ebx]
sub al, 0x55
jne 0x402ba9
jmp 0x402bb6
mov al, byte [edx]
add al, 0x20
xor al, byte [ebx]
sub al, 0x55
je 0x402bb6
pop eax
jmp 0x402bc5
sub cx, 2
je 0x402bc2
add edx, 2
inc ebx
jmp 0x402b9f
pop eax
jmp 0x402bc9
mov esi, dword [eax]
jmp 0x402b7e
mov eax, dword [eax + 8]
mov dword [ebp + 0x702d1f90], eax
lea ebx, [ebp + 0x702d1f98]
push ebx
push dword [ebp + 0x702d1f90]
call fcn.00402aac
mov dword [ebp + 0x702d2061], eax
cmp eax, 0
jne 0x402c36
lea ebx, [ebp + 0x702d1fa5]
push ebx
push dword [ebp + 0x702d1f90]
call fcn.00402aac
mov dword [ebp + 0x702d2065], eax
xor ebx, ebx
push ebx
push ebx
lea ebx, [ebp + 0x702d1f63]
push ebx
call dword [ebp + 0x702d2065]
mov dword [ebp + 0x702d1f90], eax
lea ebx, [ebp + 0x702d1f98]
push ebx
push dword [ebp + 0x702d1f90]
call fcn.00402aac
mov dword [ebp + 0x702d2061], eax
lea ebx, [ebp + 0x702d1fb4]
push ebx
push dword [ebp + 0x702d1f90]
call fcn.00402aac
mov dword [ebp + 0x702d206d], eax
lea ebx, [ebp + 0x702d1fc0]
push ebx
push dword [ebp + 0x702d1f90]
call fcn.00402aac
mov dword [ebp + 0x702d2071], eax
mov ebx, esp
sub esp, 4
push ebx
mov ebx, 0x40
push ebx
mov ebx, 0x702d214f
sub ebx, 0x702d1265
push ebx
call 0x402c83
call eax
add esp, 4
jmp 0x402c9a
lea eax, [ebp + 0x702d1296]
push eax
push dword fs:[0]
mov dword fs:[0], esp
jmp 0x402e0c
mov eax, 0xffff
int3

Function at 0x402aac
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov esi, dword [ebp + 8]
add esi, dword [esi + 0x3c]
cmp dword [esi], 0x4550
jne 0x402b41
mov edi, dword [ebp + 0xc]
mov ecx, 0x96
mov al, 0x55
repne scasb al, byte es:[edi]
mov ecx, edi
sub ecx, dword [ebp + 0xc]
mov edx, dword [esi + 0x78]
add edx, dword [ebp + 8]
mov ebx, dword [edx + 0x20]
add ebx, dword [ebp + 8]
xor eax, eax
mov edi, dword [ebx]
add edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
push ecx
mov ch, byte [esi]
xor ch, byte es:[edi]
sub ch, 0x55
jne 0x402afe
inc esi
inc edi
dec cl
jne 0x402ae9
add esp, 4
jmp 0x402b08
pop ecx
add ebx, 4
inc eax
cmp eax, dword [edx + 0x18]
jne 0x402ae0
cmp eax, dword [edx + 0x18]
jne 0x402b0f
jmp 0x402b41
mov esi, dword [edx + 0x24]
add esi, dword [ebp + 8]
push edx
mov ebx, 2
xor edx, edx
mul ebx
pop edx
add eax, esi
xor ecx, ecx
mov cx, word [eax]
mov edi, dword [edx + 0x1c]
xor edx, edx
mov ebx, 4
mov eax, ecx
mul ebx
add eax, dword [ebp + 8]
add eax, edi
mov eax, dword [eax]
add eax, dword [ebp + 8]
jmp 0x402b43
xor eax, eax
add esp, 8
leave
ret 8
Function at 0x401274
Capabilities:
Encode data using xor

Disassembly:
push 0x403634
call sub.MSVBVM60.DLL_ThunRTMain
add byte [eax], al
add byte [eax], al
add byte [eax], al
xor byte [eax], al
add byte [eax], al
inc eax
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [esi], dh
sub dword [esi + 0x2eac65c3], 0x41
mov edi, 0xb451be9c
mov eax, 0xd99c
add byte [eax], al
add byte [eax], al
add dword [eax], eax
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
push eax
popal
mov esi, 0x9cb8b451
fld dword [eax]
add byte [eax], al
add byte [eax], al
add byte [ecx], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax + 0x61], dl
imul ebp, dword [esi + 0x74], 0x44474e50
insd dword es:[edi], dx
outsd dx, dword [esi]
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
dec esp
xor dword [eax], eax
pop ds
pushfd
jg 0x40129a
invalid
Function at 0x4031b8
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 0x4031f4
movzx eax, 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 0x403214
lea eax, [esp + 0x109]
push eax
call sub.KERNEL32.DLL_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.004056b8
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x4034ac
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00405448
test esi, esi
jne 0x4034e2
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00405538
jmp 0x403500
call sub.KERNEL32.DLL_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403350
mov edi, eax
test esi, esi
je 0x403500
cmp dword [ebx], 0
je 0x403500
dec esi
jmp 0x4034e9
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

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

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x573008], 0x8088405
inc edx
mov dword [ebx + 0x573008], edx
fld qword [ebx + 0x573764]
push 0
push edx
fild qword [esp]
add esp, 8
fmulp st(1)
pop ebx
ret

Function at 0x4042ec
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x573024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x404384
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x404364
xor eax, eax
push ebp
push 0x40435d
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 0x4043a0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404364
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
movzx eax, word [0x573024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x573024], ax
mov esp, ebp
pop ebp
ret
Function at 0x4051f4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x57c04c], 0
je 0x405255
cmp word [0x57c220], 0xd7b2
jne 0x40521d
cmp dword [0x57c228], 0
jbe 0x40521d
mov eax, 0x57c21c
call dword [0x57c238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
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 0x40527c
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle
push eax
call sub.KERNEL32.DLL_WriteFile
pop edx
ret
cmp byte [0x573034], 0
jne 0x405271
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA_1
pop edx
ret

Function at 0x4053cc
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x57303c], 0
je 0x4053f2
mov edx, esi
mov eax, ebx
call dword [0x57303c]
jmp 0x405401
mov eax, 8
call fcn.00402f40
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x57c04d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x405394
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.KERNEL32.DLL_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc
Function at 0x406e30
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x407060
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
je 0x406eb3
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x407060
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
je 0x406eb3
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x40707c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x406f3c
xor eax, eax
push ebp
push 0x406f35
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00406c6c
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
je 0x406f1a
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x40709c
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
je 0x406f1a
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406f3c
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.KERNEL32.DLL_GetThreadLocale
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x407056
cmp byte [ebp - 0xd], 0
jne 0x406f83
cmp byte [ebp - 0x12], 0
je 0x407056
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x406f9c
dec ebx
cmp byte [ebx], 0x2e
je 0x406fab
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x406f9b
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x407056
inc ebx
cmp byte [ebp - 0x12], 0
je 0x406fe8
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x407056
cmp byte [ebp - 0xd], 0
je 0x407056
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x407056
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret