joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47d390
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 8
lea eax, [esp + 0xc]
lea ecx, [esp]
push ebx
push ebp
push esi
push edi
push 0
push 0
mov ebx, dword [esp + 0x24]
push 0
push 0
push 0
push 0
push eax
push ecx
push 0
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x47d50d
mov eax, dword [esp + 0x10]
test eax, eax
je 0x47d4ec
mov eax, dword [esp + 0x1c]
cmp eax, 0x104
jae 0x47d3e6
mov eax, 0x104
mov dword [esp + 0x1c], eax
lea edx, [eax + eax + 2]
push edx
call fcn.004ff0e6
mov esi, eax
add esp, 4
test esi, esi
je 0x47d50d
mov eax, dword [esp + 0x1c]
mov edi, esi
lea ecx, [eax + eax + 2]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
inc eax
push eax
push esi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x47d504
mov ebp, dword [esp + 0x20]
mov eax, ebp
or eax, 0x2001f
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x20]
push ecx
push eax
push 0
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x47d504
mov edi, dword [esp + 0x20]
test edi, edi
je 0x47d504
push ebp
push edi
call fcn.0047d390
add esp, 8
test eax, eax
je 0x47d4f9
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x5653cc]
test eax, eax
je 0x47d495
test ebp, ebp
je 0x47d495
push 0
push ebp
push esi
push ebx
call eax
test eax, eax
jne 0x47d504
jmp 0x47d4a1
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x47d504
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
je 0x47d4e3
mov edx, dword [esp + 0x1c]
xor eax, eax
mov edi, esi
lea ecx, [edx + edx + 2]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
inc eax
push eax
push esi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x47d504
mov eax, dword [esp + 0x14]
jmp 0x47d43e
push esi
call fcn.004ff10f
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
test edi, edi
je 0x47d504
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.004ff10f
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
Function at 0x47d700
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push ebx
test edx, edx
push esi
mov ebx, ecx
je 0x47d736
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
lea esi, [esp + 0xc]
or eax, 0x20019
push esi
push eax
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
mov eax, dword [esp + 0xc]
neg esi
sbb esi, esi
not esi
and esi, eax
jmp 0x47d738
mov esi, dword [ebx]
test esi, esi
je 0x47d7c3
mov edx, dword [esp + 0x10]
push edi
lea eax, [esp + 0x14]
xor edi, edi
push eax
lea ecx, [esp + 0x14]
push edi
push ecx
push edi
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne case.0x47d768.2
mov eax, dword [esp + 0x18]
cmp eax, 4
ja case.0x47d768.2
jmp dword [eax*4 + 0x47d7cc]
mov edi, 1
jmp case.0x47d768.2
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 4
sete al
mov edi, eax
jmp case.0x47d768.2
mov eax, dword [esp + 0x10]
cmp eax, 1
je case.0x47d768.0
cmp eax, 2
je case.0x47d768.0
cmp eax, 6
je case.0x47d768.0
cmp eax, 7
je case.0x47d768.0
xor edi, edi
jmp case.0x47d768.2
mov eax, dword [esp + 0x10]
xor ecx, ecx
cmp eax, 3
sete cl
mov edi, ecx
cmp esi, dword [ebx]
je 0x47d7bb
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x48b3f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
push esi
mov esi, eax
shr eax, 4
and esi, 0xf
inc eax
push edi
mov edi, dword [esp + 0xc]
and eax, 0xffff
push ecx
push eax
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x48b43e
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x48b43e
xor edx, edx
xor ecx, ecx
mov cx, word [eax]
add eax, 2
cmp esi, edx
je 0x48b443
inc edx
lea eax, [eax + ecx*2]
cmp edx, 0x10
jl 0x48b429
pop edi
xor eax, eax
pop esi
ret
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
test edi, edi
jne 0x48b453
test esi, esi
jne 0x48b471
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jle 0x48b46f
mov byte [eax + esi - 1], 0
jne 0x48b478
mov byte [esi + edi - 1], 0
mov eax, edi
pop edi
dec eax
pop esi
ret

Function at 0x490b60
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
push esi
push edi
mov esi, dword [esp + 0xc]
mov edi, eax
shr eax, 4
and edi, 0xf
inc eax
and eax, 0xffff
push ecx
push eax
push 6
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x490bb0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
je 0x490bb0
xor ecx, ecx
xor eax, eax
mov ax, word [esi]
add esi, 2
cmp edi, ecx
je 0x490bb5
inc ecx
lea esi, [esi + eax*2]
cmp ecx, 0x10
jl 0x490b9b
pop edi
xor eax, eax
pop esi
ret
mov edx, dword [esp + 0x1c]
lea ecx, [edx - 1]
cmp eax, ecx
jle 0x490bc2
mov eax, ecx
lea edx, [eax + eax]
push ebx
mov ebx, dword [esp + 0x1c]
mov ecx, edx
push ebp
mov ebp, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
pop ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [edx + ebx], 0
pop ebx
pop edi
pop esi
ret
Function at 0x4a0520
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
mov esi, ecx
push edi
push ebp
lea edi, [esi + 0xec]
mov ecx, edi
call fcn.004a6360
test al, al
jne 0x4a0541
pop edi
pop esi
pop ebp
ret 4
lea ecx, [esi + 0x78]
call fcn.004a47d0
cmp eax, 1
jne 0x4a0556
pop edi
pop esi
xor al, al
pop ebp
ret 4
mov al, byte [esi + 0xe8]
test al, al
je 0x4a0568
pop edi
pop esi
xor al, al
pop ebp
ret 4
lea ecx, [esi + 0x20]
call fcn.004a5880
push ebp
mov ecx, edi
call fcn.004a6380
mov ecx, dword [esi + 0x114]
call fcn.004a42f0
test al, al
je 0x4a061f
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x4a059a
pop edi
pop esi
xor al, al
pop ebp
ret 4
mov dword [esi + 0x14], 0x12345678
mov dword [esi + 0x18], 0x23456789
mov dword [esi + 0x1c], 0x34567890
mov eax, dword [esi + 0x10]
xor edi, edi
test eax, eax
jbe 0x4a060b
mov eax, dword [esi + 0xc]
mov cl, byte [edi + eax]
mov eax, dword [esi + 0x14]
mov byte [esp + 0x10], cl
mov ecx, esi
mov edx, dword [esp + 0x10]
push edx
push eax
call fcn.004a31b0
mov edx, dword [esi + 0x18]
mov dword [esi + 0x14], eax
and eax, 0xff
add eax, edx
mov edx, dword [esi + 0x1c]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x18], eax
shr eax, 0x18
mov byte [esp + 0x10], al
mov ecx, dword [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004a31b0
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x10]
inc edi
cmp edi, eax
jb 0x4a05b8
mov ecx, esi
call fcn.004a2f00
test al, al
jne 0x4a061f
push 0xffffffffffffff94
mov ecx, esi
call fcn.004a01c0
mov eax, dword [esi + 0x114]
mov di, word [eax + 0xe]
test di, di
je 0x4a063d
cmp di, 8
je 0x4a0643
push 0xffffffffffffff9b
mov ecx, esi
call fcn.004a01c0
cmp di, 8
jne 0x4a067a
mov al, byte [esi + 4]
test al, al
je 0x4a0652
lea eax, [esi + 0xcc]
jmp 0x4a0654
xor eax, eax
push 0x38
push str.1.1.4
lea ecx, [esi + 0x28]
push 0xfffffffffffffff1
push ecx
mov dword [esi + 0x50], eax
call fcn.0049b740
test eax, eax
je 0x4a067a
cmp eax, 2
je 0x4a067a
push eax
mov ecx, esi
call fcn.004a01c0
mov ecx, dword [esi + 0x114]
mov edx, dword [ecx + 0x18]
mov dword [esi + 0x64], edx
call fcn.004a42f0
test al, al
je 0x4a0693
add dword [esi + 0x64], 0xfffffff4
mov eax, dword [esi + 0x114]
pop edi
mov ecx, dword [eax + 0x1c]
mov dword [esi + 0x68], 0
mov dword [esi + 0x60], ecx
mov dword [esi + 0x3c], 0
mov dword [esi + 0x2c], 0
mov byte [esi + 0xe8], 0xff
pop esi
mov al, 1
pop ebp
ret 4
Function at 0x4a0be0
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x519ffe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], 0
cmp byte [edi + 0xe8], 0xff
je 0x4a0c2b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov al, byte [ebp + 0xc]
mov esi, 1
test al, al
mov dword [ebp - 0x14], esi
jne 0x4a0d6a
mov eax, dword [edi + 0x60]
test eax, eax
jne 0x4a0cda
mov eax, dword [edi + 0x114]
mov ecx, dword [edi + 0x68]
cmp ecx, dword [eax + 0x14]
je 0x4a0ce1
lea ecx, [edi + 0x78]
call fcn.004a4a80
cmp eax, 0xffffffff
jne 0x4a0c83
push 0x55c150
lea ecx, [ebp - 0x1c]
call fcn.004ff523
mov ebx, esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0
jmp 0x4a0c9d
mov ecx, dword [edi + 0x94]
lea eax, [ebp + 0xc]
push eax
mov edx, dword [ecx]
call dword [edx + 0x18]
mov ebx, 2
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], esi
mov eax, dword [eax]
push eax
push 0xffffffffffffff9a
call fcn.004a78d0
add esp, 8
mov dword [ebp - 4], 0
test bl, 2
je 0x4a0cc4
and ebx, 0xfffffffd
lea ecx, [ebp + 0xc]
mov dword [ebp - 0x18], ebx
call fcn.004ff4af
test bl, 1
mov dword [ebp - 4], 0xffffffff
je 0x4a0ce1
lea ecx, [ebp - 0x1c]
call fcn.004ff4af
jmp 0x4a0ce1
mov dword [ebp - 0x14], 0xffffffff
mov eax, dword [edi + 0x114]
cmp word [eax + 0xe], 8
jne 0x4a0cf7
lea ecx, [edi + 0x28]
push ecx
call fcn.0049b6f0
mov esi, dword [ebp + 8]
test esi, esi
je 0x4a0d6a
lea edx, [ebp + 0xc]
mov dword [ebp - 4], 2
push edx
call fcn.004fc1b5
mov eax, dword [eax]
mov ecx, dword [edi + 0x114]
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x238], eax
lea eax, [ebp + 0xc]
mov byte [ebp - 0x228], 0
push eax
call fcn.004a3ca0
mov ecx, dword [eax]
lea edx, [ebp - 0x238]
push edx
push esi
mov dword [ebp - 0x234], ecx
call fcn.0050533e
mov eax, dword [edi + 0x114]
mov eax, dword [eax + 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4a0d63
mov dword [ebp - 0x14], 0xfffffffe
mov dword [ebp - 4], 0xffffffff
lea ecx, [edi + 0xec]
call fcn.004a6440
lea ecx, [edi + 0x6c]
mov byte [edi + 0xe8], 0
call fcn.004a59a0
mov eax, dword [edi + 0xd8]
test eax, eax
je 0x4a0db7
mov esi, dword [edi + 0xd0]
test esi, esi
je 0x4a0dac
mov eax, esi
mov esi, dword [esi]
mov ecx, dword [eax + 8]
push ecx
call fcn.004ff10f
add esp, 4
test esi, esi
jne 0x4a0d98
lea ecx, [edi + 0xcc]
call fcn.004fdeef
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4a1670
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x51a1cc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
mov eax, dword [esp + 0x23c]
push ebx
push edi
push eax
lea ecx, [esp + 0xc]
call fcn.004ff523
push 0x548184
lea ecx, [esp + 0xc]
mov dword [esp + 0x240], 0
call fcn.004fd290
mov ecx, dword [esp + 8]
lea edx, [esp + 0xc]
push ecx
push edx
call fcn.004a11f0
mov ecx, dword [esp + 0x10]
mov edx, dword [eax]
push ecx
push edx
mov byte [esp + 0x24c], 1
call fcn.004214cf
add esp, 0x10
or edi, 0xffffffff
test eax, eax
je 0x4a17a9
push esi
mov esi, dword [esp + 0xc]
lea ecx, [esp + 0x14]
call fcn.0041f8ae
push 0
push esi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x248], 2
call fcn.0041f973
test eax, eax
jne 0x4a1769
lea eax, [esp + 0x30]
push 0x104
push eax
call fcn.0042cad9
add esp, 8
test eax, eax
je 0x4a1754
push esi
call fcn.004b2b5e
add esp, 4
test eax, eax
jne 0x4a1754
lea ecx, [esp + 0x30]
push ecx
call fcn.004b2b5e
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x240], 1
call fcn.0041f8ed
mov eax, edi
jmp 0x4a179b
lea ecx, [esp + 0x14]
mov byte [esp + 0x240], 1
call fcn.0041f8ed
xor eax, eax
jmp 0x4a179b
lea ecx, [esp + 0x14]
call fcn.0041fb99
mov edx, dword [esp + 0x14]
push 0x10
lea ecx, [esp + 0x18]
call dword [edx + 0x38]
neg eax
sbb eax, eax
lea ecx, [esp + 0x14]
and al, 0xfe
mov byte [esp + 0x240], 1
inc eax
mov esi, eax
call fcn.0041f8ed
mov eax, esi
cmp eax, edi
pop esi
sete al
test al, al
jne 0x4a17a9
xor bl, bl
jmp 0x4a17ab
mov bl, 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x23c], 0
call fcn.004ff4af
test bl, bl
jne 0x4a1836
mov eax, dword [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
call fcn.004a11f0
mov eax, dword [eax]
mov byte [esp + 0x244], 3
push eax
call fcn.004a1670
add esp, 0xc
lea ecx, [esp + 0xc]
test al, al
sete bl
mov byte [esp + 0x23c], 0
call fcn.004ff4af
test bl, bl
jne 0x4a180d
mov edx, dword [esp + 8]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4a1836
lea ecx, [esp + 8]
mov dword [esp + 0x23c], edi
call fcn.004ff4af
pop edi
xor al, al
pop ebx
mov ecx, dword [esp + 0x22c]
mov dword fs:[0], ecx
add esp, 0x238
ret
lea ecx, [esp + 8]
mov dword [esp + 0x23c], edi
call fcn.004ff4af
mov ecx, dword [esp + 0x234]
pop edi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x238
ret
Function at 0x4a2000
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, ecx
cmp byte [ebx + 0xe8], 1
je 0x4a2012
xor al, al
pop ebx
ret 8
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push esi
mov esi, dword [ebx + 0x114]
push ecx
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], ecx
push eax
mov eax, dword [esi + 0x14]
push eax
call fcn.004fa6b0
mov dword [esi + 0x14], eax
mov eax, dword [ebx + 0x2c]
test eax, eax
jbe 0x4a215c
push ebp
push edi
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x4a20ba
mov ecx, dword [ebx + 0x114]
call fcn.004a42f0
test al, al
je 0x4a2095
mov eax, dword [ebx + 0x64]
xor ebp, ebp
test eax, eax
jbe 0x4a2095
mov esi, dword [ebx + 0x70]
mov edi, dword [ebx + 0x1c]
add esi, ebp
and edi, 0xfffd
or edi, 2
mov cl, byte [esi]
push ecx
mov ecx, ebx
call fcn.004a2e90
mov edx, edi
mov al, byte [esi]
xor edx, 1
imul edx, edi
sar edx, 8
xor al, dl
inc ebp
mov byte [esi], al
mov eax, dword [ebx + 0x64]
cmp ebp, eax
jb 0x4a2061
mov eax, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x70]
push 0
push eax
push ecx
lea ecx, [ebx + 0x78]
call fcn.004a54f0
mov dword [ebx + 0x64], 0
mov edx, dword [ebx + 0x74]
mov dword [ebx + 0x38], edx
mov eax, dword [ebx + 0x70]
mov dword [ebx + 0x34], eax
mov ecx, dword [ebx + 0x114]
cmp word [ecx + 0xe], 8
jne 0x4a20f5
mov esi, dword [ebx + 0x3c]
lea eax, [ebx + 0x28]
push 0
push eax
call fcn.0049a440
test eax, eax
je 0x4a20e6
cmp eax, 2
je 0x4a20e6
push eax
mov ecx, ebx
call fcn.004a01c0
mov edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x64]
sub edx, esi
add eax, edx
mov dword [ebx + 0x64], eax
jmp 0x4a214f
mov eax, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x38]
cmp eax, ecx
jb 0x4a2101
mov eax, ecx
mov esi, dword [ebx + 0x28]
mov edi, dword [ebx + 0x34]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x38]
mov ebp, dword [ebx + 0x28]
mov edi, dword [ebx + 0x34]
mov esi, dword [ebx + 0x30]
sub edx, eax
sub ecx, eax
mov dword [ebx + 0x2c], edx
mov edx, dword [ebx + 0x3c]
mov dword [ebx + 0x38], ecx
mov ecx, dword [ebx + 0x64]
add ebp, eax
add edi, eax
add esi, eax
add edx, eax
add ecx, eax
mov dword [ebx + 0x28], ebp
mov dword [ebx + 0x34], edi
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x3c], edx
mov dword [ebx + 0x64], ecx
mov eax, dword [ebx + 0x2c]
test eax, eax
ja 0x4a2042
pop edi
pop ebp
pop esi
mov al, 1
pop ebx
ret 8
Function at 0x4a2170
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, ecx
cmp byte [esi + 0xe8], 1
je 0x4a2180
xor al, al
pop esi
ret
mov eax, dword [esi + 0x114]
push ebx
mov dword [esi + 0x2c], 0
push ebp
cmp word [eax + 0xe], 8
push edi
jne 0x4a223a
mov eax, dword [esi + 0x38]
test eax, eax
jne 0x4a2205
mov ecx, dword [esi + 0x114]
call fcn.004a42f0
test al, al
je 0x4a21e0
mov eax, dword [esi + 0x64]
xor ebp, ebp
test eax, eax
jbe 0x4a21e0
mov edi, dword [esi + 0x70]
mov ecx, esi
add edi, ebp
call fcn.004a3010
mov cl, byte [edi]
mov bl, al
push ecx
mov ecx, esi
call fcn.004a2e90
mov dl, byte [edi]
xor dl, bl
inc ebp
mov byte [edi], dl
mov eax, dword [esi + 0x64]
cmp ebp, eax
jb 0x4a21ba
mov edx, dword [esi + 0x64]
mov eax, dword [esi + 0x70]
push 0
push edx
push eax
lea ecx, [esi + 0x78]
call fcn.004a54f0
mov dword [esi + 0x64], 0
mov ecx, dword [esi + 0x74]
mov dword [esi + 0x38], ecx
mov edx, dword [esi + 0x70]
mov dword [esi + 0x34], edx
mov edi, dword [esi + 0x3c]
lea eax, [esi + 0x28]
push 4
push eax
call fcn.0049a440
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x64]
sub ecx, edi
add edx, ecx
test eax, eax
mov dword [esi + 0x64], edx
je 0x4a219b
cmp eax, 1
je 0x4a223a
cmp eax, 2
je 0x4a223a
push eax
mov ecx, esi
call fcn.004a01c0
mov eax, dword [esi + 0x64]
test eax, eax
jbe 0x4a229f
mov ecx, dword [esi + 0x114]
call fcn.004a42f0
test al, al
je 0x4a228d
mov eax, dword [esi + 0x64]
xor ebx, ebx
test eax, eax
jbe 0x4a228d
mov edi, dword [esi + 0x70]
mov ebp, dword [esi + 0x1c]
add edi, ebx
and ebp, 0xfffd
mov ecx, esi
or ebp, 2
mov dl, byte [edi]
push edx
call fcn.004a2e90
mov eax, ebp
mov dl, byte [edi]
xor eax, 1
imul eax, ebp
sar eax, 8
xor dl, al
inc ebx
mov byte [edi], dl
mov eax, dword [esi + 0x64]
cmp ebx, eax
jb 0x4a2259
mov ecx, dword [esi + 0x64]
mov edx, dword [esi + 0x70]
push 0
push ecx
push edx
lea ecx, [esi + 0x78]
call fcn.004a54f0
mov eax, dword [esi + 0x114]
pop edi
pop ebp
pop ebx
cmp word [eax + 0xe], 8
jne 0x4a22c9
lea ecx, [esi + 0x28]
push ecx
call fcn.0049a7c0
test eax, eax
je 0x4a22c9
cmp eax, 2
je 0x4a22c9
push eax
mov ecx, esi
call fcn.004a01c0
mov eax, dword [esi + 0x114]
mov edx, dword [esi + 0x3c]
mov ecx, dword [eax + 0x18]
add ecx, edx
mov dword [eax + 0x18], ecx
mov eax, dword [esi + 0x114]
mov ecx, dword [esi + 0x30]
mov dword [eax + 0x1c], ecx
lea ecx, [esi + 0xec]
call fcn.004a66f0
lea ecx, [esi + 0x6c]
mov byte [esi + 0xe8], 0
call fcn.004a59a0
mov al, 1
pop esi
ret

Function at 0x4a26a0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
push ebx
lea ecx, [esp + 8]
push eax
push ecx
call fcn.004a26d0
mov eax, dword [eax]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 2
lea ecx, [esp + 8]
sete bl
call fcn.004ff4af
mov al, bl
pop ebx
ret
Function at 0x4a2f00
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push 0xffffffffffffffff
push 0x51a3c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov esi, ecx
push ebp
push 0xc
lea ecx, [esp + 0x1c]
call fcn.004a58f0
mov eax, dword [esp + 0x18]
push ebp
push 0xc
push eax
lea ecx, [esi + 0x78]
mov dword [esp + 0x34], ebp
call fcn.004a45c0
mov eax, dword [esi + 0x1c]
mov ecx, dword [esp + 0x18]
and eax, 0xfffd
mov edi, dword [esi + 0x14]
or al, 2
mov dl, byte [ecx + ebp]
mov ebx, eax
xor ebx, 1
imul ebx, eax
sar ebx, 8
xor bl, dl
call fcn.004fa6a0
mov dl, bl
mov ecx, edi
and edx, 0xff
and ecx, 0xff
xor edx, ecx
mov ecx, esi
shr edi, 8
mov eax, dword [eax + edx*4]
mov edx, dword [esi + 0x18]
xor eax, edi
mov dword [esi + 0x14], eax
and eax, 0xff
add eax, edx
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x18], eax
shr eax, 0x18
mov byte [esp + 0x10], al
mov eax, dword [esi + 0x1c]
mov edx, dword [esp + 0x10]
push edx
push eax
call fcn.004a31b0
inc ebp
mov dword [esi + 0x1c], eax
cmp ebp, 0xc
jl 0x4a2f40
mov ecx, dword [esi + 0x114]
call fcn.004a4300
mov esi, dword [esi + 0x114]
test al, al
je 0x4a2fd5
xor ecx, ecx
mov cl, byte [esi + 0x11]
cmp cl, bl
jmp 0x4a2fdd
mov edx, dword [esi + 0x14]
shr edx, 0x18
cmp dl, bl
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
sete bl
call fcn.004a5970
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x4a31e0
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [esi + 0x14], 0x12345678
mov dword [esi + 0x18], 0x23456789
mov dword [esi + 0x1c], 0x34567890
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x4a3258
mov eax, dword [esi + 0xc]
mov cl, byte [eax + edi]
mov eax, dword [esi + 0x14]
mov byte [esp + 0x10], cl
mov ecx, esi
mov edx, dword [esp + 0x10]
push edx
push eax
call fcn.004a31b0
mov edx, dword [esi + 0x18]
mov dword [esi + 0x14], eax
and eax, 0xff
add eax, edx
mov edx, dword [esi + 0x1c]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x18], eax
shr eax, 0x18
mov byte [esp + 0x10], al
mov ecx, dword [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004a31b0
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x10]
inc edi
cmp edi, eax
jb 0x4a3205
push 0
call fcn.00422818
add esp, 4
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
imul edi, eax
push edi
call fcn.004b260e
add esp, 4
xor ebp, ebp
call fcn.004b261b
mov ebx, eax
sar ebx, 6
test bl, bl
mov byte [esp + 0x10], bl
jne 0x4a3290
mov bl, al
mov byte [esp + 0x10], bl
mov edi, dword [esi + 0x1c]
mov eax, dword [esp + 0x10]
and edi, 0xfffd
push eax
mov ecx, esi
or edi, 2
call fcn.004a2e90
mov ecx, edi
mov edx, dword [esp + 0x1c]
xor ecx, 1
imul ecx, edi
mov eax, dword [edx + 4]
sar ecx, 8
xor cl, bl
mov byte [eax + ebp], cl
inc ebp
cmp ebp, 0xa
jl 0x4a3278
mov ebp, dword [esp + 0x18]
mov edi, dword [esi + 0x1c]
mov ebx, ebp
and edi, 0xfffd
sar ebx, 0x10
mov byte [esp + 0x10], bl
or edi, 2
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, esi
call fcn.004a2e90
mov edx, edi
mov eax, dword [esp + 0x1c]
xor edx, 1
imul edx, edi
mov ecx, dword [eax + 4]
mov eax, ebp
sar edx, 8
xor dl, bl
mov byte [ecx + 0xa], dl
mov edi, dword [esi + 0x1c]
mov ebx, dword [esi + 0x14]
and edi, 0xfffd
sar eax, 0x18
mov byte [esp + 0x10], al
or edi, 2
call fcn.004fa6a0
mov dl, byte [esp + 0x10]
mov ecx, ebx
and edx, 0xff
and ecx, 0xff
xor edx, ecx
mov ecx, dword [esi + 0x18]
shr ebx, 8
mov eax, dword [eax + edx*4]
mov ebp, dword [esi + 0x1c]
xor eax, ebx
mov dword [esi + 0x14], eax
and eax, 0xff
add eax, ecx
imul eax, eax, 0x8088405
inc eax
mov ebx, eax
mov dword [esi + 0x18], eax
shr ebx, 0x18
call fcn.004fa6a0
mov ecx, edi
mov edx, ebp
xor ecx, 1
and ebx, 0xff
imul ecx, edi
and edx, 0xff
pop edi
xor ebx, edx
mov edx, dword [esp + 0x18]
shr ebp, 8
mov eax, dword [eax + ebx*4]
xor eax, ebp
mov dword [esi + 0x1c], eax
mov al, byte [esp + 0xc]
sar ecx, 8
xor cl, al
mov eax, dword [edx + 4]
pop esi
pop ebp
mov byte [eax + 0xb], cl
pop ebx
pop ecx
ret 8