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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor edi, edi
mov dword [ecx + 0x9c], edi
cmp dword [str.SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
mov ebx, 0x43b8ac
je 0x429e23
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x429e0b
mov esi, dword [ebx + 4]
jmp 0x429e05
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x429df5
cmp dword [ebp - 0xc], 4
jne 0x429df5
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x429ded
or dword [eax + 0x9c], ecx
jmp 0x429df5
not ecx
and dword [eax + 0x9c], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
add esi, 8
mov eax, dword [esi]
cmp eax, edi
jne 0x429db9
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x429d9c
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x42b2d4
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x42b309
cmp edi, dword [esi + 0xc]
jge 0x42b309
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x42b309
cmp edi, dword [eax + 8]
jge 0x42b309
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x42b30b
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x42b2d5
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x42b309
cmp edi, dword [esi + 0xc]
jge 0x42b309
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x42b309
cmp edi, dword [eax + 8]
jge 0x42b309
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x42b30b
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x42b40f
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x42b443
jmp fcn.0041a5a0
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret
Function at 0x42b411
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x42b443
jmp fcn.0041a5a0
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

Function at 0x42b4b4
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x42b5ad
cmp eax, dword [edi + 0xc]
jge 0x42b5ad
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x42b505
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x42b596
cmp dword [ebp + 0xc], ebx
je 0x42b596
jmp 0x42b52f
push 0x10
call fcn.0042b1a0
cmp eax, ebx
je 0x42b51b
mov ecx, eax
call fcn.0042b406
mov esi, eax
jmp 0x42b51d
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x42b546
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x42b556
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x42b568
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0041a5a0
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.00410320
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x42b5a8
cmp ecx, dword [esi + 8]
jge 0x42b5a8
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x42b5ae
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x42b66c
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 0x42b69a
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x42b6b8
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0042b5d6
jmp 0x42b6b8
mov eax, dword [esi + 0x14]
test eax, eax
je 0x42b6b8
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.0042b5d6
test edi, edi
mov eax, edi
jne 0x42b6a2
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x43ef84]
test ecx, ecx
je 0x42b76b
jmp 0x42b66b
ret 8
Function at 0x418530
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x10000]
push edi
or ebp, 0xffffffff
jmp 0x418552
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x418559
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x418548
mov eax, 1
add ebx, ebx
jne 0x41856b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x418560
jne 0x41857c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x418560
xor ecx, ecx
sub eax, 3
jb 0x418590
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x418602
mov ebp, eax
add ebx, ebx
jne 0x41859b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4185a8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4185cc
inc ecx
add ebx, ebx
jne 0x4185b8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4185ad
jne 0x4185c9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4185ad
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4185ec
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4185dd
jmp 0x41854e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4185ec
add edi, ecx
jmp 0x41854e
pop esi
mov edi, esi
mov ecx, 0x4ff
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x41860a
cmp byte [edi], 2
jne 0x41860a
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 eax, ebx
loop 0x41860f
lea edi, [esi + 0x16000]
mov eax, dword [edi]
or eax, eax
je 0x418687
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x1bca4]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1bd30]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x41863c
mov ecx, edi
jns 0x41866b
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 + 0x1bd34]
or eax, eax
je 0x418681
mov dword [ebx], eax
add ebx, 4
jmp 0x418659
call dword [esi + 0x1bd38]
popal
jmp 0x40a754
Function at 0x401350
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x58
xor eax, eax
push 0x44
push eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0xc], 0
call fcn.00401ae0
add esp, 0xc
push 1
push 0x401330
mov dword [esp + 0x1c], 0x44
call dword [sym.imp.kernel32.dll_SetConsoleCtrlHandler]
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 0
push 1
push 0
push 0
push eax
push 0
call dword [sym.imp.kernel32.dll_CreateProcessA]
test eax, eax
jne 0x4013d5
push str.failed_to_create_process._n
call fcn.004018e6
add eax, 0x40
push eax
call fcn.004017ca
add esp, 8
xor eax, eax
add esp, 0x58
ret
mov edx, dword [esp + 4]
mov ecx, dword [esp + 0xc]
push 0xffffffffffffffff
push edx
mov dword [0x412000], ecx
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov ecx, dword [esp + 4]
lea eax, [esp]
push eax
push ecx
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
test eax, eax
jne 0x401406
push str.failed_to_get_exit_code_from_process._n
jmp 0x4013be
mov eax, dword [esp]
add esp, 0x58
ret
Function at 0x401ee2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411280]
jne 0x401eec
repz ret
jmp fcn.00404399

Function at 0x408379
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
pushal
call 0x408388
pop dword [ebp - 0x28]
mov eax, 0xb2fce633
sub eax, 0xb2bc62ab
sub dword [ebp - 0x28], eax
push 0x40
push 0x1000
push 0x36c8e
push 0
mov eax, 0xf0efe789
sub eax, 0xf0af06b1
add eax, dword [ebp - 0x28]
call dword [eax]
mov ecx, 0x34569c7b
add ecx, 0xcba9a1b7
mov ebx, eax
mov esi, 0x8dda045
sub esi, 0x89c6481
add esi, dword [ebp - 0x28]
mov edx, 0xb9e5e4e2
sub edx, 0xa431a2a4
sub dword [ebp - 0x18], edx
mov edi, dword [esi]
add dword [ebp - 0xc], eax
xor edi, edx
xor dword [ebp - 0x1c], esi
mov dword [ebx], edi
add dword [ebp - 0x10], esi
add ebx, 0x9dbd73b1
sub ebx, 0x9dbd73ad
add esi, 0xfcf99b32
add esi, 0x30664d2
loop 0x4083e7
add eax, 0x96c2d6d2
add eax, 0x693e14c9
xor ebx, ebx
add ebx, eax
add eax, 0xc5ad75e4
add eax, 0x3a528a21
mov ecx, 0x400000
add ecx, dword [ebp - 0x28]
call ebx
leave
ret
Function at 0x401320
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ebp, [esi + 0x10]
mov edi, dword [ebp]
mov ebx, edi
xor ebx, 0x14d
mov dword [esp + 0x18], ebp
cmp dword [esi + 0x14], 0x10
jb 0x401343
mov esi, dword [esi]
shr edi, 2
push esi
push edi
push str._x_and__p
mov dword [esp + 0x20], edi
call fcn.00401026
add esp, 0xc
test edi, edi
je 0x4013a0
mov ebp, esi
push 4
lea eax, [esp + 0x14]
push ebp
push eax
call fcn.004078c0
imul ecx, dword [esp + 0x1c], 0x5bd1e991
add esp, 0xc
imul ebx, ebx, 0x5bd1e991
add ebp, 4
mov eax, ecx
shr eax, 0x18
xor eax, ecx
imul eax, eax, 0x5bd1e991
xor ebx, eax
mov dword [esp + 0x10], eax
sub edi, 1
jne 0x40135f
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov eax, dword [ebp]
xor ecx, ecx
and eax, 3
sub eax, 1
je 0x4013c9
sub eax, 1
je 0x4013bf
sub eax, 1
jne 0x4013d7
movsx ecx, byte [esi + edi*4 + 2]
shl ecx, 0x10
movsx eax, byte [esi + edi*4 + 1]
shl eax, 8
xor ecx, eax
movsx eax, byte [esi + edi*4]
xor eax, ecx
imul eax, eax, 0x5bd1e991
xor ebx, eax
mov eax, ebx
shr eax, 0xd
xor eax, ebx
imul ecx, eax, 0x5bd1e991
pop edi
pop esi
pop ebp
pop ebx
mov eax, ecx
shr eax, 0xf
xor eax, ecx
add esp, 0xc
ret
Function at 0x406887
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push esi
push edi
mov eax, 0x1a1
cmp eax, 0x24
ja 0x406895
call 0x85667b9
mov al, byte [0x8b640041]
cmp eax, 0x30
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x44ee30], eax
sub eax, eax
je 0x4068ba
call 0xa8d6511c
invalid
call 0x401154
call 0x40664a
pop edi
xor eax, eax
pop esi
ret

Function at 0x407505
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407544
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407544
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407544
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407544
cmp dword [ecx + 0x74], 0xe
jbe 0x407544
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x40d5db
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2c8
push 0x41c2c0
push str.FlsAlloc
push 0x1e
call fcn.0040d49c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d60f
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
jmp 0x40d615
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40d659
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2d8
push 0x41c2d0
push str.FlsGetValue
push 0x20
call fcn.0040d49c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d690
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4110f8
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x411195
push ebx
push esi
call fcn.004110c1
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0041100a
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x411142
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x411194
push edi
push eax
call fcn.0040dd8e
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x411162
call fcn.0040d32f
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x411193
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041100a
add esp, 0x20
test eax, eax
jne 0x411181
push edi
call fcn.0040d32f
jmp 0x411189
push ebx
call fcn.0040d32f
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x418a40
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x418a6d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x418a6d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x6f6c2010
Capabilities:
Contain obfuscated stackstrings
Get process heap flags
Get process heap force flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x38
mov eax, dword [ecx + 8]
mov ebx, dword [ecx]
mov edi, dword [ecx + 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x20], eax
test byte [0x6f6c4028], 8
jne 0x6f6c20d0
mov esi, dword fs:[0x18]
mov dword [esp + 8], ebx
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str._p__p__p__p_n
mov dword [esp + 8], str.NsiFreeTable
mov dword [esp + 4], 0x6f6c4028
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x6f6c2042
Function at 0x6f6c2660
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x48
mov esi, dword [0x6f6c4104]
mov edi, dword [ecx]
cmp esi, 0xffffffff
je 0x6f6c27a0
mov eax, dword [edi + 0x1c]
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
add eax, 0x2c
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x6f6c282a
mov eax, dword [edi + 8]
mov edx, dword [edi + 0x1c]
mov ecx, dword [eax]
mov dword [ebx], ecx
mov ecx, dword [eax + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [ebx + 8], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebx + 0xc], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebx + 0x10], ecx
mov eax, dword [eax + 0x14]
mov ecx, dword [edi + 0x18]
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x14], eax
mov eax, dword [edi + 0x10]
mov dword [ebx + 0x18], eax
mov eax, dword [edi + 0xc]
mov dword [ebx + 0x1c], eax
mov eax, dword [edi + 0x20]
mov dword [ebx + 0x24], eax
mov eax, dword [edi + 0x2c]
mov dword [esp + 8], edx
mov dword [ebx + 0x28], eax
lea eax, [ebx + 0x2c]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._memcpy
lea eax, [ebp - 0x1c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x28]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x24]
mov dword [esp], esi
xor esi, esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x121008
call dword [sym.imp.kernel32.dll_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x6f6c2798
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
lea esp, [ebp - 0x10]
mov eax, esi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
mov edx, dword [ebp - 0x30]
mov esi, dword [edx + 0x34]
jmp 0x6f6c275e
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0
mov dword [esp], str..Nsi
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ecx, eax
cmp eax, 0xffffffff
je 0x6f6c2802
mov eax, esi
lock cmpxchg dword [0x6f6c4104], ecx
cmp eax, 0xffffffff
je 0x6f6c2802
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov esi, dword [0x6f6c4104]
cmp esi, 0xffffffff
jne 0x6f6c2685
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
mov esi, 0xe
jmp 0x6f6c2782
Function at 0x6f6c35f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x6f6c364b
cmp byte [esi + ebx - 1], 0xa
je 0x6f6c361f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x6f6c4120], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x40290c
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 0x402949
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 0x402969
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.004045f8
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x402ad0
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.00404388
test esi, esi
jne 0x402b06
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.00404478
jmp 0x402b24
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004029e4
mov edi, eax
test esi, esi
je 0x402b24
cmp dword [ebx], 0
je 0x402b24
dec esi
jmp 0x402b0d
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x40342c
Capabilities:
Query or enumerate registry value

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

Function at 0x404188
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x49c048], 0
je 0x4041e9
cmp word [0x49c21c], 0xd7b2
jne 0x4041b1
cmp dword [0x49c224], 0
jbe 0x4041b1
mov eax, 0x49c218
call dword [0x49c234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x496078
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 0x404210
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x496034], 0
jne 0x404205
push 0
push 0x496070
push 0x496078
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x40433c
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.00402730
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x49c049], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404304
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc