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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x525267
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1044
call fcn.004eff30
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
neg esi
sbb esi, esi
and esi, 0xffffff00
add eax, 8
mov dword [esp + 0x24], ebx
add esi, 0x200
push edi
mov dword [esp + 0x24], ebx
cmp dword [eax], ebx
je 0x4632a7
lea ecx, [esp + 0x40]
call fcn.00435802
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x4632a7
xor esi, esi
mov edi, 0x56f16c
push edi
lea ecx, [esp + 0x24]
call fcn.00402946
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1060], ebx
call fcn.00402946
push edi
lea ecx, [esp + 0x18]
mov byte [esp + 0x1060], 1
call fcn.00402946
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x1068], 2
call fcn.00462a8e
mov dword [esp + 0x30], eax
cmp eax, ebx
je 0x4633dd
mov dword [esp + 0x1c], esi
or dword [esp + 0x1c], 1
mov dword [esp + 0xc], ebx
xor eax, eax
cmp dword [esp + 0xc], 1
sete al
push eax
push 1
push dword [esp + 0x1c]
lea eax, [esp + 0x40]
push eax
call fcn.00462961
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x20]
xor esi, esi
push ebx
push dword [esp + 0x24]
mov dword [esp + 0x20], ebx
push dword [esp + 0x40]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
cmp edi, ebx
jne 0x46339e
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x30]
push eax
push ebx
push dword [esp + 0x30]
mov dword [esp + 0x40], 0x1000
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
cmp esi, ebx
jne 0x463394
cmp dword [esp + 0x28], 4
jne 0x463394
mov eax, dword [esp + 0x50]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [esp + 0x24], 1
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 5
je 0x4633a8
cmp esi, 5
jne 0x4633cb
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x1060], 2
call fcn.00462a2f
inc dword [esp + 0xc]
cmp dword [esp + 0xc], 2
jl 0x463311
jmp 0x4633dd
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x1060], 2
call fcn.00462a2f
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x1054]
mov eax, dword [esp + 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x46341c
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52522f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
neg esi
sbb esi, esi
and esi, 0xffffff00
add eax, 8
add esi, 0x200
push edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebx
cmp dword [eax], ebx
je 0x46347b
lea ecx, [esp + 0x40]
call fcn.00435802
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x46347b
xor esi, esi
mov edi, 0x56f16c
push edi
lea ecx, [esp + 0x24]
call fcn.00402946
push edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x60], ebx
call fcn.00402946
push edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x60], 1
call fcn.00402946
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x68], 2
call fcn.00462a8e
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x4635b0
mov dword [esp + 0x10], esi
mov esi, 0x20006
or dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
xor eax, eax
cmp dword [esp + 0xc], 1
sete al
push eax
push esi
push dword [esp + 0x20]
lea eax, [esp + 0x40]
push eax
call fcn.00462961
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x18]
push eax
push ebx
push dword [esp + 0x1c]
xor edi, edi
push ebx
push ebx
push ebx
push dword [esp + 0x38]
mov dword [esp + 0x34], ebx
push dword [esp + 0x48]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [esp + 0x2c], eax
cmp eax, ebx
jne 0x463575
mov eax, dword [ebp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x46352e
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x14]
xor eax, eax
cmp dword [ebp + 0x18], ebx
setne al
inc eax
push eax
push ebx
push dword [esp + 0x30]
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x46356b
mov dword [esp + 0x24], 1
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x2c], 5
je 0x463581
cmp edi, 5
jne 0x4635a1
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x60], 2
call fcn.00462a2f
inc dword [esp + 0xc]
cmp dword [esp + 0xc], 2
jl 0x4634e0
jmp 0x4635b0
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x60], 2
call fcn.00462a2f
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x4635ec
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52522f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
neg esi
sbb esi, esi
and esi, 0xffffff00
add eax, 8
add esi, 0x200
push edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebx
cmp dword [eax], ebx
je 0x46364b
lea ecx, [esp + 0x40]
call fcn.00435802
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x46364b
xor esi, esi
mov edi, 0x56f16c
push edi
lea ecx, [esp + 0x24]
call fcn.00402946
push edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x60], ebx
call fcn.00402946
push edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x60], 1
call fcn.00402946
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x68], 2
call fcn.00462a8e
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x463762
mov dword [esp + 0x10], esi
mov esi, 0x20006
or dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
xor eax, eax
cmp dword [esp + 0xc], 1
sete al
push eax
push esi
push dword [esp + 0x20]
lea eax, [esp + 0x40]
push eax
call fcn.00462961
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x18]
push eax
push ebx
push dword [esp + 0x1c]
xor edi, edi
push ebx
push ebx
push ebx
push dword [esp + 0x38]
mov dword [esp + 0x34], ebx
push dword [esp + 0x48]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [esp + 0x2c], eax
cmp eax, ebx
jne 0x463727
push 4
lea eax, [ebp + 0x14]
push eax
push 4
push ebx
push dword [esp + 0x30]
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x46371d
mov dword [esp + 0x24], 1
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x2c], 5
je 0x463733
cmp edi, 5
jne 0x463753
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x60], 2
call fcn.00462a2f
inc dword [esp + 0xc]
cmp dword [esp + 0xc], 2
jl 0x4636b0
jmp 0x463762
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x60], 2
call fcn.00462a2f
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x46379e
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x525203
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
neg esi
sbb esi, esi
and esi, 0xffffff00
add eax, 8
add esi, 0x200
push edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
cmp dword [eax], ebx
je 0x4637fd
lea ecx, [esp + 0x38]
call fcn.00435802
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x4637fd
xor esi, esi
mov edi, 0x56f16c
push edi
lea ecx, [esp + 0x24]
call fcn.00402946
push edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x58], ebx
call fcn.00402946
push edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x58], 1
call fcn.00402946
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x60], 2
call fcn.00462a8e
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x4638fc
mov dword [esp + 0x10], esi
or dword [esp + 0x10], 2
mov dword [esp + 0xc], ebx
xor eax, eax
cmp dword [esp + 0xc], 1
sete al
push eax
push 2
push dword [esp + 0x20]
lea eax, [esp + 0x38]
push eax
call fcn.00462961
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x14]
xor edi, edi
push ebx
push dword [esp + 0x28]
mov dword [esp + 0x24], ebx
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
cmp esi, ebx
jne 0x4638c3
push dword [esp + 0x20]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edi, eax
cmp edi, ebx
jne 0x4638b9
mov dword [esp + 0x24], 1
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 5
je 0x4638cd
cmp edi, 5
jne 0x4638ed
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x58], 2
call fcn.00462a2f
inc dword [esp + 0xc]
cmp dword [esp + 0xc], 2
jl 0x46385e
jmp 0x4638fc
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x58], 2
call fcn.00462a2f
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x463938
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5251d7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
neg edi
sbb edi, edi
add eax, 8
mov ecx, dword [eax]
and edi, 0xffffff00
add edi, 0x200
mov dword [esp + 0x10], ebx
mov dword [esp + 0x28], ebx
cmp ecx, ebx
je 0x4639a3
lea ecx, [esp + 0x38]
mov dword [esp + 0x10], 1
call fcn.00435802
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x4639a3
mov al, 1
jmp 0x4639a5
xor al, al
test byte [esp + 0x10], 1
je 0x4639b1
and dword [esp + 0x10], 0xfffffffe
cmp al, bl
je 0x4639b7
xor edi, edi
mov esi, 0x56f16c
push esi
lea ecx, [esp + 0x28]
call fcn.00402946
push esi
lea ecx, [esp + 0x20]
mov dword [esp + 0x68], ebx
call fcn.00402946
push esi
lea ecx, [esp + 0x24]
mov byte [esp + 0x68], 1
call fcn.00402946
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x70], 2
call fcn.00462a8e
mov esi, eax
cmp esi, ebx
je 0x463b24
mov dword [esp + 0x14], ebx
xor eax, eax
cmp dword [esp + 0x14], 1
sete al
push eax
push 0x20006
push dword [esp + 0x28]
lea eax, [esp + 0x38]
push eax
call fcn.00462961
mov dword [esp + 0x18], ebx
lea eax, [esp + 0x18]
push eax
push 0x51
mov byte [esp + 0x6c], 4
call fcn.00460cd7
test eax, eax
jl 0x463a66
or dword [esp + 0x10], 2
lea ecx, [esp + 0x48]
lea eax, [esp + 0x18]
call fcn.00435802
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x463a66
mov al, 1
jmp 0x463a68
xor al, al
test byte [esp + 0x10], 2
je 0x463a74
and dword [esp + 0x10], 0xfffffffd
cmp al, bl
je 0x463abc
cmp dword [0x5788c0], ebx
jne 0x463aa8
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
je 0x463aa0
push str.RegDeleteKeyExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5788c0], eax
cmp dword [0x5788c0], ebx
je 0x463ab7
push ebx
push edi
push dword [esp + 0x24]
push esi
call dword [0x5788c0]
jmp 0x463ac7
xor eax, eax
inc eax
jmp 0x463ac7
push dword [esp + 0x1c]
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
cmp eax, ebx
jne 0x463ad3
mov dword [esp + 0x28], 1
mov byte [esp + 0x64], 3
cmp eax, 5
mov eax, dword [esp + 0x18]
jne 0x463b0b
cmp eax, ebx
je 0x463aeb
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x68], 2
call fcn.00462a2f
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 2
jl 0x463a0d
jmp 0x463b24
cmp eax, ebx
je 0x463b15
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x68], 2
call fcn.00462a2f
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x24]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x28]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x464cef
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc04
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [ebp + 0xc], ebx
je 0x464e4f
cmp dword [ebp + 0x10], ebx
je 0x464e4f
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x464d27
xor edi, edi
jmp 0x464d3d
lea eax, [edi + edi]
call fcn.004eff00
mov esi, esp
push ebx
push edi
push dword [ebp + 0xc]
call fcn.00440bc3
mov edi, eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [ebp - 4], eax
xor eax, eax
push 0x7fe
mov word [ebp - 0xc04], ax
lea eax, [ebp - 0xc02]
push ebx
push eax
call fcn.004ee670
mov eax, dword [ebp + 0xc]
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x464d6b
sub eax, esi
mov esi, 0x400
push esi
lea ecx, [ebp - 0xc04]
push ecx
push eax
push dword [ebp + 0xc]
push 8
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x464d99
xor eax, eax
jmp 0x464e54
push 0x3ff
lea eax, [ebp - 0x403]
push ebx
push eax
mov byte [ebp - 0x404], bl
call fcn.004ee670
add esp, 0xc
push ebx
push ebx
push esi
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0xc04]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea eax, [ebp - 0xc04]
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x464d92
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0x404]
push esi
push eax
call fcn.004ccc5b
pop ecx
pop ecx
test eax, eax
jne 0x464e4f
cmp dword [ebp - 4], ebx
je 0x464d92
push ebx
push ebx
push ebx
push str.select__from_sqlite_master
push dword [esi]
mov byte [ebp + 0x13], bl
call fcn.004bc31e
add esp, 0x14
test eax, eax
je 0x464e3b
push dword [esi]
call fcn.004cbfa7
pop ecx
push edi
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x464e3f
push esi
push dword [ebp + 0xc]
call fcn.004ccc5b
pop ecx
pop ecx
test eax, eax
jne 0x464e3f
mov byte [ebp + 0x13], 1
xor eax, eax
cmp byte [ebp + 0x13], bl
setne al
dec eax
and eax, 0x80004005
jmp 0x464e54
mov eax, 0x80004005
lea esp, [ebp - 0xc10]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x46aa9c
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push dword [ebp + 8]
mov dword [edi], ebx
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x46ab0c
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi], eax
cmp eax, ebx
je 0x46ab03
add eax, 2
push eax
call fcn.004e7db0
mov dword [edi], eax
mov ecx, dword [esi]
inc ecx
inc ecx
push ecx
push ebx
push eax
call fcn.004ee670
add esp, 0x10
push ebx
lea eax, [ebp - 8]
push eax
push dword [esi]
push dword [edi]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
leave
ret
Function at 0x46b06b
Capabilities:
Check if file exists
Create directory
Write file on windows

Disassembly:
mov eax, 0x5240d1
call fcn.0051f0b4
push ecx
push ecx
push esi
push edi
mov edi, ecx
xor esi, esi
cmp edi, esi
jne 0x46b088
xor eax, eax
jmp 0x46b199
push edi
lea ecx, [ebp - 0x10]
call fcn.00401f01
push 0x543c50
push 0x104
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], esi
call fcn.00401db6
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x46b0c5
push esi
push dword [ebp - 0x10]
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0040297c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
cmp eax, esi
jl 0x46b081
jne 0x46b106
push esi
push 0x80
push 2
push esi
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x46b199
push ebx
push esi
push 0x80
push 2
push esi
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x46b12f
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x46b198
push dword [ebp + 8]
mov dword [ebp - 0x10], esi
call fcn.0046bee1
pop ecx
test eax, eax
jne 0x46b186
push 0x8000
call fcn.004eae7a
mov edi, eax
push edi
push dword [ebp + 8]
call fcn.0046c01f
add esp, 0xc
jmp 0x46b172
push esi
lea ecx, [ebp - 0x14]
push ecx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push dword [ebp + 8]
call fcn.0046c01f
pop ecx
pop ecx
cmp eax, esi
jg 0x46b159
jne 0x46b17f
mov dword [ebp - 0x10], 1
push edi
call fcn.004ea208
pop ecx
mov edi, dword [ebp + 8]
call fcn.0046c244
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret

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

Disassembly:
mov eax, dword [ecx]
mov edx, eax
xor edx, dword [esp + 4]
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edi + edx*4]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edi + edx*4]
pop esi
mov dword [ecx + 8], eax
mov eax, dword [esp + 4]
ret
Function at 0x46c855
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [esi + 0x4090], eax
je 0x46c8b5
cmp dword [esi + 0x6c], eax
jbe 0x46c8b5
push ebx
mov dword [ebp - 4], 0xffffff78
sub dword [ebp - 4], esi
push edi
lea ebx, [esi + 0x88]
lea edx, [esi + 0x4094]
mov eax, edx
call fcn.0046c2af
mov edi, dword [esi + 0x40a0]
mov dword [ebp - 0xc], eax
movzx eax, byte [ebx]
push eax
mov ecx, edx
call fcn.0046b56f
mov al, byte [ebp - 0xc]
xor byte [ebx], al
mov eax, dword [ebp - 4]
add esp, 4
inc ebx
add eax, ebx
cmp eax, dword [esi + 0x6c]
jb 0x46c87f
pop edi
pop ebx
push dword [esi + 0x6c]
lea eax, [esi + 0x88]
push eax
push dword [esi + 0x20]
push dword [esi + 0x1c]
call dword [esi + 8]
add esp, 0x10
cmp eax, dword [esi + 0x6c]
je 0x46c8d4
or dword [ebp - 8], 0xffffffff
and dword [esi + 0x6c], 0
mov eax, dword [ebp - 8]
leave
ret
Function at 0x46c9b8
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push edi
xor edi, edi
mov dword [esp + 4], edi
mov dword [esp + 8], edi
cmp ebx, edi
jne 0x46c9d2
push 0xffffffffffffff9a
pop eax
jmp 0x46cb86
cmp dword [ebx + 0x2c], edi
je 0x46c9ca
cmp dword [ebx + 0x80], 8
push ebp
push esi
mov dword [ebx + 0x34], edi
jne 0x46ca2f
cmp dword [ebx + 0x84], edi
jne 0x46ca2f
lea ebp, [ebx + 0x30]
cmp dword [ebx + 0x40], 0
jne 0x46ca0d
mov esi, ebx
call fcn.0046c855
lea eax, [ebx + 0x88]
mov dword [ebx + 0x40], 0x4000
mov dword [ebx + 0x3c], eax
mov esi, dword [ebx + 0x44]
push 4
push ebp
call fcn.0046d005
mov edi, eax
mov eax, dword [ebx + 0x44]
sub eax, esi
add dword [ebx + 0x6c], eax
pop ecx
pop ecx
test edi, edi
je 0x46c9f0
cmp edi, 1
jne 0x46ca2f
xor edi, edi
cmp dword [ebx + 0x6c], 0
jbe 0x46ca47
test edi, edi
jne 0x46ca47
mov esi, ebx
call fcn.0046c855
cmp eax, 0xffffffff
jne 0x46ca47
or edi, eax
cmp dword [ebx + 0x80], 8
jne 0x46ca69
cmp dword [ebx + 0x84], 0
jne 0x46ca83
lea eax, [ebx + 0x30]
push eax
call fcn.0046d747
and dword [ebx + 0x68], 0
pop ecx
mov edi, eax
cmp dword [ebx + 0x84], 0
jne 0x46ca83
mov eax, dword [ebx + 0x408c]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x38]
mov dword [esp + 0x10], eax
mov esi, dword [ebx + 0x74]
mov ebp, dword [ebx + 0x40a4]
mov ecx, dword [esp + 0xc]
add ebp, dword [ebx + 0x44]
push 4
add esi, 0x10
pop edx
call fcn.0046c3c1
mov esi, dword [ebx + 0x74]
push 4
add esi, 0x14
pop edx
mov ecx, ebp
call fcn.0046c3c1
xor ecx, ecx
inc ecx
cmp dword [ebx + 0x5c], ecx
jne 0x46cac4
mov esi, dword [ebx + 0x74]
push 2
add esi, 0x24
pop edx
call fcn.0046c3c1
mov esi, dword [ebx + 0x74]
mov ecx, dword [esp + 0x10]
push 4
add esi, 0x18
pop edx
call fcn.0046c3c1
test edi, edi
jne 0x46caec
push dword [ebx + 0x78]
lea edi, [ebx + 0x24]
push dword [ebx + 0x74]
call fcn.0046c2ea
pop ecx
pop ecx
mov edi, eax
push dword [ebx + 0x74]
call fcn.004ea208
pop ecx
test edi, edi
jne 0x46cb78
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x70]
push edi
add eax, 0xe
push eax
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 0x10]
add esp, 0x18
test eax, eax
je 0x46cb23
or edi, 0xffffffff
jmp 0x46cb5f
push dword [ebx + 0x20]
mov ecx, dword [esp + 0x10]
push 4
pop esi
mov edi, ebx
call fcn.0046c378
mov edi, eax
pop ecx
test edi, edi
jne 0x46cb5f
push dword [ebx + 0x20]
mov ecx, ebp
mov edi, ebx
call fcn.0046c378
mov edi, eax
pop ecx
test edi, edi
jne 0x46cb5f
push dword [ebx + 0x20]
mov ecx, dword [esp + 0x14]
mov edi, ebx
call fcn.0046c378
pop ecx
mov edi, eax
push 0
push dword [esp + 0x18]
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 0x10]
add esp, 0x10
test eax, eax
je 0x46cb78
or edi, 0xffffffff
inc dword [ebx + 0x40b0]
and dword [ebx + 0x2c], 0
pop esi
mov eax, edi
pop ebp
pop edi
add esp, 0xc
ret