joyce8/EMBER2024-capa huggingface dataset:
Function at 0x536820
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 8
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
jg 0x536844
jl 0x536839
test ecx, ecx
jne 0x536844
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
push esi
push edi
mov edi, ecx
je 0x536912
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
jmp 0x536860
mov ecx, ebx
call fcn.00449970
mov ecx, edx
mov esi, eax
mov dword [ebp - 8], ecx
test ecx, ecx
jl 0x5368b2
jg 0x536878
test esi, esi
je 0x5368b2
mov eax, dword [ebp - 4]
cmp eax, ecx
jg 0x53688a
jl 0x536885
cmp edi, esi
jae 0x53688a
mov esi, edi
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push dword [ebp + 8]
call fcn.0055bfb0
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [ebp - 4]
sub edi, esi
sbb ecx, dword [ebp - 8]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov eax, dword [ebp + 8]
jmp 0x5368d3
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x5368fc
mov eax, dword [ebp + 8]
add edi, 0xffffffff
mov esi, 1
mov byte [eax], cl
mov ecx, dword [ebp - 4]
adc ecx, 0xffffffff
add eax, esi
mov dword [ebp - 4], ecx
mov dword [ebp + 8], eax
test ecx, ecx
jg 0x536860
jl 0x5368ff
test edi, edi
jne 0x536860
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edx, dword [eax]
test edx, edx
je 0x53694d
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x53694d
mov edi, dword [ebp + 8]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push edx
push edi
call fcn.0055bfb0
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp + 8], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
cmp dword [ebx + 0x4c], 0
mov ecx, edi
mov esi, dword [ebp + 8]
je 0x5369be
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x536979
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov ecx, edi
cmp edi, 0xfff
jbe 0x5369a7
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.005792dc
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x5369d2
cmp edi, eax
ja 0x536983
test ecx, ecx
je 0x5369be
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.005792dc
mov ecx, edi
add esp, 0x10
sub ecx, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, ecx
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x5369f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
je 0x536abe
mov esi, dword [ebp + 0x10]
mov ebx, esi
mov edx, dword [ebp + 0xc]
mov edi, edx
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
test esi, esi
jl 0x536aad
jg 0x536a28
test edx, edx
je 0x536aad
call fcn.00449cc0
mov esi, eax
mov eax, edx
mov dword [ebp - 8], eax
test eax, eax
jl 0x536a76
jg 0x536a3e
test esi, esi
je 0x536a76
cmp ebx, eax
jg 0x536a4d
jl 0x536a48
cmp edi, esi
jae 0x536a4d
mov esi, edi
mov dword [ebp - 8], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 8]
push esi
push eax
mov eax, dword [ecx + 0x20]
push dword [eax]
call fcn.0055bfb0
mov ecx, dword [ebp - 4]
add esp, 0xc
sub edi, esi
sbb ebx, dword [ebp - 8]
mov eax, dword [ecx + 0x30]
sub dword [eax], esi
mov eax, dword [ecx + 0x20]
add dword [eax], esi
jmp 0x536a9a
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
push eax
call edx
cmp eax, 0xffffffff
je 0x536aa7
mov ecx, dword [ebp - 4]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [ebp + 8], esi
test ebx, ebx
jg 0x536a28
jl 0x536aa7
test edi, edi
jne 0x536a28
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
sub edx, edi
pop edi
sbb esi, ebx
mov eax, edx
mov edx, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ecx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], esi
mov eax, dword [eax]
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], eax
test eax, eax
je 0x536add
mov eax, dword [ecx + 0x30]
mov eax, dword [eax]
jmp 0x536adf
xor eax, eax
cdq
mov ebx, eax
mov eax, edx
mov dword [ebp + 0x10], eax
test edi, edi
jl 0x536b58
jg 0x536af1
test esi, esi
je 0x536b58
test eax, eax
jl 0x536b3c
jg 0x536afb
test ebx, ebx
je 0x536b3c
cmp edi, eax
jg 0x536b0a
jl 0x536b05
cmp esi, ebx
jae 0x536b0a
mov ebx, esi
mov dword [ebp + 0x10], edi
push ebx
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.0055bfb0
mov ecx, dword [ebp - 4]
add esp, 0xc
mov edx, dword [ebp + 8]
sub esi, ebx
sbb edi, dword [ebp + 0x10]
add edx, ebx
mov eax, dword [ecx + 0x30]
sub dword [eax], ebx
mov eax, dword [ecx + 0x20]
add dword [eax], ebx
test edi, edi
jl 0x536b58
jg 0x536b3f
test esi, esi
je 0x536b58
jmp 0x536b3f
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x536b58
push eax
push esi
push 1
push edx
call fcn.0056c308
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x537150
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ad780
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x63434c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x238], esi
test eax, eax
je 0x5372bb
test edi, edi
je 0x5372bb
xor ecx, ecx
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], cx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x234]
push ecx
push 0x20019
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x53726f
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0055c530
add esp, 0xc
mov dword [ebp - 0x23c], 0x208
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x238]
push eax
push 0
push edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x537263
cmp dword [ebp - 0x238], 1
jne 0x537263
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x537241
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.0042e2d0
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x230]
mov ecx, esi
push eax
call fcn.0043f980
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x5372d4
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5372af
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5372f3
push edx
push ecx
call fcn.00558004
add esp, 8
jmp 0x5372d4
xor eax, eax
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret 0xc
call fcn.00566a14
int3
Function at 0x538a20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ad97d
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x63434c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [0x63ea44]
test esi, esi
jne 0x538a66
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push esi
xor bl, bl
mov dword [ebp - 0x24], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 4], 0
cmp byte [0x63ea48], bl
jne 0x538c1f
cmp dword [0x63ea40], 0
je 0x538c1f
cmp dword [0x63ea28], 0
je 0x538c1f
cmp dword [0x63ea3c], 0
je 0x538c1f
cmp dword [0x63e9f4], 0
je 0x538c1f
cmp dword [0x63e9f0], 0
je 0x538c1f
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push 0
push str.SOFTWAREPdfRegUnHook
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
test eax, eax
je 0x538c1f
call fcn.0053b330
call fcn.0053d690
call fcn.0053db50
call fcn.0053c8c0
call fcn.00539910
push 0x538df0
push 0x63ea40
call fcn.0053f4a0
mov ebx, eax
push 0x538c40
push 0x63ea28
mov dword [ebp - 0x20], ebx
call fcn.0053f4a0
xor edi, edi
mov dword [ebp - 0x10], eax
add esp, 0x10
cmp dword [0x63e9d8], edi
je 0x538b4d
push 0x538f30
push 0x63e9d8
call fcn.0053f4a0
add esp, 8
mov edi, eax
cmp dword [0x63e9ec], 0
mov dword [ebp - 0x14], 0
je 0x538b72
push 0x539080
push 0x63e9ec
call fcn.0053f4a0
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [0x63e9f0], 0
mov dword [ebp - 0x18], 0
je 0x538b97
push 0x5393f0
push 0x63e9f0
call fcn.0053f4a0
add esp, 8
mov dword [ebp - 0x18], eax
test ebx, ebx
je 0x538bb9
cmp dword [ebp - 0x10], 0
je 0x538bb9
cmp dword [0x63e9d8], 0
je 0x538bae
test edi, edi
je 0x538bb9
mov byte [0x63ea48], 1
mov bl, 1
jmp 0x538c1f
xor bl, bl
mov byte [0x63ea48], 0
cmp dword [ebp - 0x20], 0
je 0x538bd5
push 0x63ea40
call fcn.0053f910
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x538be8
push 0x63ea28
call fcn.0053f910
add esp, 4
test edi, edi
je 0x538bf9
push 0x63e9d8
call fcn.0053f910
add esp, 4
cmp dword [ebp - 0x14], 0
je 0x538c0c
push 0x63e9ec
call fcn.0053f910
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x538c1f
push 0x63e9f0
call fcn.0053f910
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x53f910
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
push esi
cmp dword [0x63ea58], ebx
jne 0x53f937
push 0x63ea5c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x63ea58], 1
push 0x63ea5c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x63ea74]
test esi, esi
je 0x53fa60
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
lea eax, [esi + 0x30]
cmp eax, ecx
je 0x53f977
mov esi, dword [esi]
test esi, esi
jne 0x53f956
pop edi
push 0x63ea5c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi + 8]
push dword [esi + 4]
call fcn.0053fb50
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 4]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push dword [esi + 8]
mov dword [ebp - 4], ebx
push dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x53fa5a
mov eax, dword [esi + 8]
xor ecx, ecx
mov edx, dword [esi + 4]
test eax, eax
je 0x53f9ca
mov al, byte [esi + ecx + 0x50]
mov byte [ecx + edx], al
inc ecx
mov eax, dword [esi + 8]
cmp ecx, eax
jb 0x53f9b8
mov edx, dword [esi + 4]
mov ebx, dword [ebp - 0xc]
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [esi + 8]
push dword [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov eax, dword [esi + 4]
xor ebx, ebx
mov dword [edi], eax
mov edi, dword [0x63ea74]
mov dword [ebp - 0xc], 1
test edi, edi
je 0x53fa55
cmp edi, esi
je 0x53fa13
mov ebx, edi
mov edi, dword [edi]
test edi, edi
jne 0x53fa02
mov ebx, dword [ebp - 0xc]
jmp 0x53fa5a
test ebx, ebx
jne 0x53fa29
mov eax, dword [edi]
dec dword [0x63ea78]
mov ebx, dword [ebp - 0xc]
mov dword [0x63ea74], eax
jmp 0x53fa5a
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 0x70
push ebx
call esi
mov eax, dword [edi]
mov dword [ebx], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x70
push ebx
call esi
dec dword [0x63ea78]
mov ebx, dword [ebp - 0xc]
jmp 0x53fa5a
mov ebx, 1
call fcn.0053fa80
pop edi
push 0x63ea5c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x53fa80
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push 0xf
mov dword [ebp - 4], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor esi, esi
cmp dword [0x63ea80], esi
jbe 0x53fad6
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x63ea7c]
push dword [eax + esi*4]
call ebx
mov eax, dword [0x63ea7c]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [0x63ea80]
jb 0x53fab4
pop ebx
push dword [0x63ea7c]
call fcn.00566374
add esp, 4
mov dword [0x63ea7c], 0
mov dword [0x63ea80], 0
push dword [ebp - 4]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x53fdd0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [0x63ea74]
xor ebx, ebx
test esi, esi
je 0x53fe44
mov ecx, dword [ebp + 8]
cmp esi, ecx
je 0x53fdf7
mov ebx, esi
mov esi, dword [esi]
test esi, esi
jne 0x53fde5
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x53fe04
mov eax, dword [esi]
mov dword [0x63ea74], eax
jmp 0x53fe2a
lea eax, [ebp - 4]
push eax
push 0x40
push 0x70
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [esi]
mov dword [ebx], eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push 0x70
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp + 8]
cmp dword [ebp + 0xc], 0
je 0x53fe3e
push 0x8000
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
dec dword [0x63ea78]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x554930
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.00558750
mov eax, dword [0x63434c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x1008]
mov ecx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
push edx
push 0x20219
push 0
push eax
push ecx
mov dword [ebp - 0x1008], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x554a23
push 0x1000
push eax
mov dword [ebp - 0x100c], eax
lea eax, [ebp - 0x1004]
push eax
call fcn.0055c530
add esp, 0xc
mov dword [ebp - 0x1010], 0x1000
lea eax, [ebp - 0x1010]
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x100c]
push eax
push 0
push esi
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x1008]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x5549e1
cmp dword [ebp - 0x100c], 1
jne 0x554a23
lea edx, [ebp - 0x1004]
lea esi, [edx + 2]
lea ebx, [ebx]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x5549f0
sub edx, esi
lea eax, [ebp - 0x1004]
sar edx, 1
mov ecx, edi
push edx
push eax
call fcn.0042e2d0
pop edi
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.00557e89
mov esp, ebp
pop ebp
ret
Function at 0x557330
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x63434c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x55741f
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov esi, eax
test esi, esi
je 0x557404
cmp esi, 0x104
jae 0x557404
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x55740c
cmp dword [ebp - 0x210], 0
mov ecx, str.System32_s
push edi
mov eax, 0x5d9178
cmove eax, ecx
push eax
push 0x1800
push 0
mov eax, 0x104
sub eax, esi
push 0
push eax
lea eax, [ebp - 0x20c]
lea eax, [eax + esi*2]
push eax
call fcn.0049cb20
add esp, 0x1c
test eax, eax
js 0x557404
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x55741f
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00557e89
mov esp, ebp
pop ebp
ret

Function at 0x580e4d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00580afe

Function at 0x580e58
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00580c88

Function at 0x584d3f
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00584cc1
Function at 0x592270
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x63434c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push 0x208
push 0
push eax
mov dword [ebp - 0x210], esi
call fcn.0055c530
add esp, 0xc
mov dword [ebp - 0x210], 0x208
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x20c]
push eax
push 0
push str.InfoHD
push str.SoftwareKingsoftOffice6.0Common
push 0x80000001
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
test eax, eax
je 0x592300
xor eax, eax
mov word [esi], ax
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, esi
mov word [esi], ax
mov eax, dword [ebp - 0x210]
shr eax, 1
dec eax
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0042e2d0
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00557e89
mov esp, ebp
pop ebp
ret
Function at 0x595570
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x63434c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push 0x208
push 0
push eax
mov dword [ebp - 0x210], esi
call fcn.0055c530
add esp, 0xc
mov dword [ebp - 0x210], 0x208
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x20c]
push eax
push 0
push str.InfoHD3_C
push str.SoftwareKingsoftOffice6.0Common
push 0x80000001
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
test eax, eax
je 0x595600
xor eax, eax
mov word [esi], ax
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, esi
mov word [esi], ax
mov eax, dword [ebp - 0x210]
shr eax, 1
dec eax
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0042e2d0
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00557e89
mov esp, ebp
pop ebp
ret
Function at 0x4045a4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00406938
test esi, esi
jne 0x4045dc
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00406a74
jmp 0x4045fa
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004044e8
mov edi, eax
test esi, esi
je 0x4045fa
cmp dword [ebx], 0
je 0x4045fa
dec esi
jmp 0x4045e3
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x405e80
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x51f054], 0
je 0x405ee1
cmp word [0x51f330], 0xd7b2
jne 0x405ea9
cmp dword [0x51f338], 0
jbe 0x405ea9
mov eax, 0x51f32c
call dword [0x51f348]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
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 0x405f0c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x51c030], 0
jne 0x405efd
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x40608c
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 [0x51c034], 0
je 0x4060b2
mov edx, esi
mov eax, ebx
call dword [0x51c034]
jmp 0x4060c1
mov eax, 8
call fcn.00404230
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x51f055], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x406054
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 0x408838
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe94
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 8], edx
mov esi, eax
xor eax, eax
push ebp
push 0x40899f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.00406938
cmp si, word [0x51c7d0]
jb 0x4088d2
cmp si, word [0x51c9d0]
ja 0x4088d2
mov edi, 0x40
xor eax, eax
mov dword [ebp - 0xc], eax
cmp edi, dword [ebp - 0xc]
jb 0x4088d2
mov ebx, dword [ebp - 0xc]
add ebx, edi
shr ebx, 1
cmp si, word [ebx*8 + 0x51c7d0]
jae 0x4088ac
mov edi, ebx
dec edi
jmp 0x4088cd
cmp si, word [ebx*8 + 0x51c7d0]
jbe 0x4088bc
inc ebx
mov dword [ebp - 0xc], ebx
jmp 0x4088cd
mov edx, dword [ebp - 8]
mov eax, dword [ebx*8 + 0x51c7d4]
call fcn.00408748
jmp 0x4088d2
cmp edi, dword [ebp - 0xc]
jae 0x408896
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x408981
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408981
push 0x55
lea eax, [ebp - 0xb6]
push eax
push 0x59
movzx ebx, si
push ebx
call sub.kernel32.dll_GetLocaleInfoW
push 0x55
lea eax, [ebp - 0x160]
push eax
push 0x5a
push ebx
call sub.kernel32.dll_GetLocaleInfoW
lea eax, [ebp - 0x164]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.00406b20
push dword [ebp - 0x164]
push 0x4089bc
lea eax, [ebp - 0x168]
lea edx, [ebp - 0x160]
mov ecx, 0x55
call fcn.00406b20
push dword [ebp - 0x168]
push 0x4089cc
lea eax, [ebp - 0x16c]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.00406b20
push dword [ebp - 0x16c]
mov eax, dword [ebp - 8]
mov edx, 5
call fcn.00406ed8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4089a6
lea eax, [ebp - 0x16c]
mov edx, 3
call fcn.00406930
ret