joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4066cd
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
mov eax, dword [0x439034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x43b148]
test eax, eax
jne 0x40674a
call fcn.0040660d
test eax, eax
mov dword [0x43b148], eax
jne 0x406745
push 0x5c64
call fcn.0040ab5b
test eax, eax
pop ecx
je 0x406711
push esi
mov esi, eax
call fcn.004065c6
pop esi
jmp 0x406713
xor eax, eax
push 0x43b148
push 0x436308
mov dword [0x43b148], eax
lea eax, [ebp - 0x204]
push 0xffffffffffffffff
push eax
call fcn.0040995f
add esp, 0x10
lea eax, [ebp - 0x204]
push eax
push str.BUGREPORT_HANDLER_ADDR
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [0x43b148]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aab8
leave
ret

Function at 0x406756
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, eax
lea eax, [esi + 0x5c48]
push edi
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esi + 0x5c44]
cmp byte [eax], 0
je 0x406791
mov esi, 0x810a0001
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
mov byte [eax], 1
xor eax, eax
cmp dword [ebp + 8], eax
mov dword [esi + 4], eax
jne 0x4067a5
mov dword [ebp + 8], 0x436b00
mov ebx, 0x104
push ebx
lea edi, [esi + 0x583c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push edi
call fcn.0040ba18
test eax, eax
pop ecx
pop ecx
jne 0x4067ce
mov esi, 0x810a0002
jmp 0x40677f
mov ecx, eax
sub ecx, esi
sub ecx, 0x583c
or edi, 0xffffffff
push edi
sar ecx, 1
push str._bdcrashreport.exe
sub ebx, ecx
push ebx
push eax
call fcn.0040ac6b
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push edi
push eax
lea eax, [esi + 0x2ec]
push 0x1000
push eax
call fcn.0040ac6b
push edi
push 0x41ecb8
lea eax, [esi + 0x573c]
push 0x40
push eax
call fcn.0040ac6b
push edi
push dword [ebp + 8]
lea eax, [esi + 0x57bc]
push 0x40
push eax
call fcn.0040ac6b
add esp, 0x30
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.bdbugreport__u
lea eax, [esi + 0x5a44]
push edi
push eax
call fcn.0040995f
add esp, 0x10
mov edi, 0x406956
push edi
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
cmp eax, edi
mov dword [esi], eax
jne 0x406862
and dword [esi], 0
push 0x4068cb
call fcn.0040b078
mov dword [esp], 0x40691e
call fcn.0040b0ce
pop ecx
xor esi, esi
jmp 0x40677f
Function at 0x406c36
Capabilities:
Enumerate threads
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push 0
push 4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x406c54
xor eax, eax
jmp 0x406cdb
push esi
push 0x1c
pop esi
push esi
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.0040add0
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
push ebx
mov dword [ebp - 0x1c], esi
call sub.KERNEL32.dll_Thread32First
test eax, eax
jne 0x406c83
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x406cda
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x10], eax
jne 0x406ccb
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x14], eax
je 0x406ccb
push dword [ebp - 0x14]
push 0
push 0x1f03ff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
test esi, esi
je 0x406c7f
cmp dword [ebp + 8], 0
push esi
je 0x406cbe
call dword [sym.imp.KERNEL32.dll_SuspendThread]
jmp 0x406cc4
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x1c]
push eax
push ebx
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x406c83
inc eax
pop esi
pop ebx
leave
ret 4
Function at 0x407528
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov ebx, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x18]
push eax
call ebx
call dword [sym.imp.bdcommon.dll_GetLogController]
mov esi, eax
test esi, esi
jne 0x40755d
mov eax, 0x80004005
jmp 0x4075dd
mov eax, dword [esi]
push str.BaiduBrowser
mov ecx, esi
call dword [eax]
mov eax, dword [esi]
mov edi, str.enable:0
push edi
push 4
push str.pipe
mov ecx, esi
call dword [eax + 0x10]
mov eax, dword [esi]
push edi
push 3
push str.file
mov ecx, esi
call dword [eax + 0x10]
mov eax, dword [esi]
push edi
push 2
push str.dbgoutput
mov ecx, esi
call dword [eax + 0x10]
mov eax, dword [esi]
push str.enable:1_filter:__tagperf_
push 5
push str.sharememory
mov ecx, esi
call dword [eax + 0x10]
lea eax, [ebp - 0x10]
push eax
call ebx
push dword [ebp - 4]
mov eax, dword [ebp - 0x10]
push dword [ebp - 8]
sub eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
sbb ecx, dword [ebp - 0x14]
push ecx
push eax
push 0x436850
push 0x436b00
push 0x25
call fcn.0040a382
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x407654
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x439034]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push str.MemoryLeakDetectInfo
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, 1
jb 0x4076de
push esi
push edi
mov esi, str.LeakDetectHWND
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0040ad66
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x4076dc
push 0x10
push 0
push esi
call fcn.0040abc5
pop ecx
lea eax, [edi + eax*2]
push eax
call fcn.0040b84e
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4076dc
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4076dc
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x465
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aab8
leave
ret
Function at 0x4081c7
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
jne 0x4081d9
xor eax, eax
jmp 0x408248
push esi
mov esi, edi
call fcn.00408859
lea esi, [ebp - 0x14]
call fcn.00406518
push dword [ebp + 8]
mov esi, 0x5834
push esi
push ebx
push 4
add eax, 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp dword [ebp - 4], ebx
mov dword [edi + 4], eax
je 0x40821a
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x40823d
push esi
push ebx
push ebx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [edi + 8], eax
jne 0x408241
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x408247
xor eax, eax
inc eax
mov dword [edi + 0xc], eax
pop esi
pop ebx
leave
ret 4

Function at 0x409cdc
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0xc]
mov esi, eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x409d34
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x409d25
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x409d21
cmp edi, eax
jae 0x409d25
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x409d13
cmp edi, eax
jb 0x409d29
xor eax, eax
jmp 0x409d33
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x40aa01
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x439034]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0040a940
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.0040add0
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 0x40aa50
cmp dword [ebp - 0x1c], 5
jb 0x40aa68
jmp 0x40aa64
cmp dword [ebp - 0x10], 1
jne 0x40aa68
cmp dword [ebp - 0x1c], 4
ja 0x40aa64
jne 0x40aa68
cmp dword [ebp - 0x18], 0
jbe 0x40aa68
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x41d34c
call fcn.0040a7d6
test eax, eax
jge 0x40aa89
mov byte [0x43b150], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0040aab8
add ebp, 0x78
leave
ret

Function at 0x40aab8
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x439034]
jne 0x40aac2
repz ret
jmp fcn.0040cd7a
Function at 0x40ae4a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x40ae77
call fcn.0040cecc
mov dword [eax], esi
call fcn.0040ceb9
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0040b09a
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x40ae53
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40aea6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040cedf
pop ecx
call fcn.0040ceb9
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x40aecd
test al, 1
je 0x40aecd
test byte [esp + 0xc], 2
je 0x40aecd
call fcn.0040cecc
mov dword [eax], 5
call fcn.0040ceb9
mov dword [eax], 0xd
jmp 0x40ae9d
xor eax, eax
pop esi
ret

Function at 0x40e636
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 + 0x4391c0]
je 0x40e651
inc edi
cmp edi, 0x17
jb 0x40e642
cmp edi, 0x17
jae 0x40e7d1
push ebp
push 3
call fcn.00414eef
cmp eax, 1
pop ecx
je 0x40e79d
push 3
call fcn.00414eef
test eax, eax
pop ecx
jne 0x40e685
cmp dword [0x439030], 1
je 0x40e79d
cmp ebx, 0xfc
je 0x40e7d0
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x43a8c8
push ebp
call fcn.0040f3f8
add esp, 0xc
test eax, eax
je 0x40e6bb
push esi
push esi
push esi
push esi
push esi
call fcn.0040af7c
add esp, 0x14
push 0x104
mov esi, 0x43a8e1
push esi
push 0
mov byte [0x43a9e5], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40e6ff
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0040f3f8
add esp, 0xc
test eax, eax
je 0x40e6ff
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040af7c
add esp, 0x14
push esi
call fcn.0040abe0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40e744
push esi
call fcn.0040abe0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x43abdc
push 0x41d99c
sub ecx, eax
push ecx
push eax
call fcn.00414e3c
add esp, 0x14
test eax, eax
je 0x40e744
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0040af7c
add esp, 0x14
jmp 0x40e746
xor esi, esi
push 0x41d998
push ebx
push ebp
call fcn.00414dcb
add esp, 0xc
test eax, eax
je 0x40e766
push esi
push esi
push esi
push esi
push esi
call fcn.0040af7c
add esp, 0x14
push dword [edi*8 + 0x4391c4]
push ebx
push ebp
call fcn.00414dcb
add esp, 0xc
test eax, eax
je 0x40e788
push esi
push esi
push esi
push esi
push esi
call fcn.0040af7c
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00414c0e
add esp, 0xc
jmp 0x40e7d0
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x40e7d0
cmp ebp, 0xffffffff
je 0x40e7d0
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4391c4]
push dword [esi]
call fcn.0040abe0
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 0x414c0e
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0040e061
xor ebx, ebx
cmp dword [0x43b00c], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x414ce4
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x414dc4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x414dc4
push eax
call fcn.0040dff3
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x43b00c], eax
call esi
push eax
call fcn.0040dff3
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x43b010], eax
call esi
push eax
call fcn.0040dff3
mov dword [0x43b014], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0041143e
test eax, eax
pop ecx
pop ecx
je 0x414cb2
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040af7c
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x414ce4
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0040dff3
cmp eax, ebx
pop ecx
mov dword [0x43b01c], eax
je 0x414ce4
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040dff3
pop ecx
mov dword [0x43b018], eax
mov eax, dword [0x43b018]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x414d69
cmp dword [0x43b01c], ecx
je 0x414d69
push eax
call fcn.0040e06a
push dword [0x43b01c]
mov esi, eax
call fcn.0040e06a
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x414d69
cmp edi, ebx
je 0x414d69
call esi
cmp eax, ebx
je 0x414d36
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x414d36
test byte [ebp - 0x18], 1
jne 0x414d69
lea eax, [ebp - 0x10]
push eax
call fcn.00411475
test eax, eax
pop ecx
je 0x414d51
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040af7c
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x414d60
or dword [ebp + 0x10], 0x200000
jmp 0x414da4
or dword [ebp + 0x10], 0x40000
jmp 0x414da4
mov eax, dword [0x43b010]
cmp eax, dword [ebp - 8]
je 0x414da4
push eax
call fcn.0040e06a
cmp eax, ebx
pop ecx
je 0x414da4
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x414da4
mov eax, dword [0x43b014]
cmp eax, dword [ebp - 8]
je 0x414da4
push eax
call fcn.0040e06a
cmp eax, ebx
pop ecx
je 0x414da4
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x43b00c]
call fcn.0040e06a
cmp eax, ebx
pop ecx
je 0x414dc4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x414dc6
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x5316f0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x11d000]
push edi
jmp 0x53170a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x531711
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x531700
mov eax, 1
add ebx, ebx
jne 0x531723
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x531734
jne 0x531753
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x531753
dec eax
add ebx, ebx
jne 0x531740
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x531718
add ebx, ebx
jne 0x53174f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x5317a5
xor ecx, ecx
sub eax, 3
jb 0x53176b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x5317da
sar eax, 1
mov ebp, eax
jmp 0x531776
add ebx, ebx
jne 0x531776
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x531744
inc ecx
add ebx, ebx
jne 0x531784
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x531744
add ebx, ebx
jne 0x531791
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x531786
jne 0x5317a2
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x531786
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x5317c4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x5317b6
jmp 0x531706
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x5317c4
add edi, ecx
jmp 0x531706
pop esi
mov edi, esi
mov ecx, 0x2cd
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x5317e2
cmp byte [edi], 9
jne 0x5317e2
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x5317e7
lea edi, [esi + 0x12f000]
mov eax, dword [edi]
or eax, eax
je 0x53185f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x137248]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x137310]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x531814
mov ecx, edi
jns 0x531843
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x137314]
or eax, eax
je 0x531859
mov dword [ebx], eax
add ebx, 4
jmp 0x531831
call dword [esi + 0x137324]
mov ebp, dword [esi + 0x137318]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x20f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x531893
sub esp, 0xffffff80
jmp 0x408fd6
Function at 0x40323c
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.004049f4
test esi, esi
jne 0x403272
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.00404ae4
jmp 0x403290
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403140
mov edi, eax
test esi, esi
je 0x403290
cmp dword [ebx], 0
je 0x403290
dec esi
jmp 0x403279
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x4039c8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x47f024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403a60
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403a40
xor eax, eax
push ebp
push 0x403a39
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 0x403a7c
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 0x403a40
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x47f024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x47f024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404874
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x482048], 0
je 0x4048d5
cmp word [0x48221c], 0xd7b2
jne 0x40489d
cmp dword [0x482224], 0
jbe 0x40489d
mov eax, 0x482218
call dword [0x482234]
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 0x4048fc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x47f030], 0
jne 0x4048f1
push 0
push 0x47f754
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x405db4
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 0x405fe4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x405e37
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x405fe4
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x405e37
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406000
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x405ec0
xor eax, eax
push ebp
push 0x405eb9
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00405bf0
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
test eax, eax
je 0x405e9e
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x406020
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405e9e
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 0x405ec0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
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 0x405fda
cmp byte [ebp - 0xd], 0
jne 0x405f07
cmp byte [ebp - 0x12], 0
je 0x405fda
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x405f20
dec ebx
cmp byte [ebx], 0x2e
je 0x405f2f
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x405f1f
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x405fda
inc ebx
cmp byte [ebp - 0x12], 0
je 0x405f6c
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 0x405fda
cmp byte [ebp - 0xd], 0
je 0x405fda
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 0x405fda
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