joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40b2c0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi]
test eax, eax
je 0x40b2d6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 4]
mov ebx, dword [ebp + 8]
push eax
push esi
push 0
push 0x2001f
push 0
push 0
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40b32c
push esi
push 0x2001f
push 0
push edi
push ebx
mov dword [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40b32c
xor edx, edx
mov dword [esi], 0
test eax, eax
sete dl
pop edi
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp - 4], 1
jne 0x40b353
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x40b353
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esi]
push edx
push 1
push eax
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
xor edx, edx
pop edi
test eax, eax
sete dl
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40b3c0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, ecx
mov dword [ebp - 4], 0
cmp dword [ebx], 0
jne 0x40b3de
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push esi
mov esi, dword [ebp + 0x14]
push edi
lea edi, [esi + 1]
push edi
call dword [sym.imp.PNCRT.dll_malloc]
mov dword [ebp - 8], edi
xor edi, edi
add esp, 4
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x40b4c1
lea ecx, [ebp - 8]
lea edx, [ebp - 0x10]
push ecx
mov ecx, dword [ebx]
push eax
mov eax, dword [ebp + 8]
push edx
push edi
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [ebp + 0x14]
mov ecx, ebx
push edx
mov dword [ebp + 8], eax
mov dword [ebp + 0x14], edi
call fcn.0040b5b0
cmp dword [ebp - 0x10], 1
jne 0x40b49f
cmp dword [ebp + 0x14], edi
jbe 0x40b49f
mov ebx, dword [ebp + 0x10]
mov ecx, esi
mov edx, ecx
xor eax, eax
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 8]
test eax, eax
jne 0x40b461
mov eax, dword [ebp - 8]
cmp esi, eax
jb 0x40b45a
mov esi, eax
mov eax, dword [ebp - 0xc]
push esi
push eax
jmp 0x40b486
mov edx, dword [ebp + 0xc]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, ecx
jae 0x40b478
mov ecx, esi
jmp 0x40b484
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push ebx
call dword [sym.imp.PNCRT.dll_strncpy]
mov eax, dword [ebp + 8]
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 4], ecx
jmp 0x40b4b4
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push esi
push edx
push eax
call dword [sym.imp.PNCRT.dll_strncpy]
add esp, 0xc
mov dword [ebp - 4], edi
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.PNCRT.dll_free]
add esp, 4
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40b5f0
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
push edi
mov dword [ebp - 0x14], ecx
push ebx
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x40b6d9
lea eax, [ebp - 4]
mov dword [ebp - 4], esi
push eax
push 0x2001f
push esi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40b6e7
push eax
push eax
mov edx, dword [ebp - 4]
push eax
push eax
push eax
push eax
lea ecx, [ebp - 0xc]
push eax
push ecx
push eax
push eax
push eax
push edx
mov dword [ebp - 0xc], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x40b6e7
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
lea esi, [eax - 1]
test esi, esi
jl 0x40b6b9
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ebx, 0x400
mov eax, dword [ebp - 4]
push 0
push 0
push 0
lea ecx, [ebp - 0x10]
push 0
lea edx, [ebp - 0x414]
push ecx
push edx
push esi
push eax
mov dword [ebp - 0x10], ebx
call edi
cmp eax, 0x103
je 0x40b6b3
test eax, eax
jne 0x40b6b0
mov edx, dword [ebp - 4]
lea ecx, [ebp - 0x414]
push ecx
mov ecx, dword [ebp - 0x14]
push edx
call fcn.0040b5f0
mov dword [ebp - 8], eax
dec esi
jns 0x40b672
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
test eax, eax
mov eax, dword [ebp - 8]
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x40cdb0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ecf0
push 0x40d120
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffff98
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
push 2
call dword [sym.imp.PNCRT.dll___set_app_type]
add esp, 4
mov dword [0x45fa6c], 0xffffffff
mov dword [0x45fa70], 0xffffffff
call dword [sym.imp.PNCRT.dll___p__fmode]
mov ecx, dword [0x45fa34]
mov dword [eax], ecx
call dword [sym.imp.PNCRT.dll___p__commode]
mov edx, dword [0x45fa30]
mov dword [eax], edx
mov eax, dword [sym.imp.PNCRT.dll__adjust_fdiv]
mov ecx, dword [eax]
mov dword [0x45fa68], ecx
call fcn.0040d110
mov eax, dword [0x4117e8]
test eax, eax
jne 0x40ce41
push 0x40d100
call dword [sym.imp.PNCRT.dll___setusermatherr]
add esp, 4
call fcn.0040d0e0
push 0x41002c
push 0x410028
call sub.PNCRT.dll__initterm
add esp, 8
mov edx, dword [0x45fa2c]
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [0x45fa28]
push ecx
lea edx, [ebp - 0x64]
push edx
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x60]
push ecx
call dword [sym.imp.PNCRT.dll___getmainargs]
add esp, 0x14
push 0x410024
push section..data
call sub.PNCRT.dll__initterm
add esp, 8
mov edx, dword [sym.imp.PNCRT.dll__acmdln]
mov esi, dword [edx]
mov dword [ebp - 0x74], esi
cmp byte [esi], 0x22
jne 0x40cf4f
inc esi
mov dword [ebp - 0x74], esi
mov al, byte [esi]
test al, al
je 0x40ceb5
cmp al, 0x22
jne 0x40cea7
cmp byte [esi], 0x22
jne 0x40cebe
inc esi
mov dword [ebp - 0x74], esi
mov al, byte [esi]
test al, al
je 0x40cece
cmp al, 0x20
ja 0x40cece
inc esi
mov dword [ebp - 0x74], esi
jmp 0x40cebe
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40ceef
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40cef4
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x68], eax
push eax
call dword [sym.imp.PNCRT.dll_exit]
jmp 0x40cf34
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x40cebe
inc esi
mov dword [ebp - 0x74], esi
jmp 0x40cf4f
Function at 0x402e9a
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x4263b0]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402f2e
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402eeb
cmp dword [ebp + 0x10], ebx
jne 0x402f22
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402e9a
test eax, eax
jne 0x402efd
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402ed2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.004065d1
cmp eax, ebx
je 0x402f35
push ebx
push dword [0x4263b0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402f2e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x4263b0], ebx
jne 0x402f2b
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402f2b
jmp 0x402f2e
Function at 0x40337c
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x4033a9
mov ecx, dword [0x426358]
push edi
add eax, ecx
push edi
push eax
mov dword [0x41889c], eax
push dword [0x40a674]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.004034a7
cmp eax, edi
jl 0x4034a0
lea eax, [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push eax
lea eax, [ebp + 8]
push esi
push eax
push dword [0x40a674]
call ebx
test eax, eax
je 0x40349d
cmp dword [ebp - 4], esi
jne 0x40349d
push dword [ebp + 8]
add dword [0x41889c], esi
call fcn.004034a7
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x4034a0
cmp dword [ebp + 0x10], edi
jne 0x40346c
cmp dword [ebp + 8], edi
jle 0x403498
mov esi, 0x414898
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x40341c
mov edi, dword [ebp + 8]
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push dword [0x40a674]
call ebx
test eax, eax
je 0x40349d
cmp edi, dword [ebp - 4]
jne 0x40349d
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403468
cmp dword [ebp + 0x14], edi
jne 0x403468
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x41889c], eax
cmp dword [ebp + 8], 0
jg 0x40340f
jmp 0x403498
push 0xfffffffffffffffe
jmp 0x40349f
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403477
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push edi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a674]
call ebx
test eax, eax
je 0x40349d
mov eax, dword [ebp - 4]
add dword [0x41889c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x4034a0
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4034a7
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x41889c]
sub esi, dword [0x40c808]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
add eax, 0x1f4
cmp esi, ebx
mov dword [0x42630c], eax
jle 0x403611
push dword [0x4208ac]
call fcn.00403655
push ebx
push ebx
push dword [0x40c808]
push dword [0x40a674]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x4208a8], esi
mov dword [0x418898], ebx
mov ebp, 0x40c898
mov eax, dword [0x4188a0]
mov edi, 0x4000
sub eax, dword [0x4208ac]
cmp eax, edi
jg 0x40351c
mov edi, eax
mov esi, 0x414898
push edi
push esi
call fcn.00403623
test eax, eax
je 0x403603
add dword [0x4208ac], edi
mov dword [0x40c828], esi
mov dword [0x40c82c], edi
cmp dword [0x426310], ebx
je 0x403573
cmp dword [0x4263a0], ebx
jne 0x403573
mov eax, dword [0x4208a8]
push ebx
sub eax, dword [0x41889c]
sub eax, dword [esp + 0x1c]
add eax, dword [0x40c808]
mov dword [0x418898], eax
call fcn.00403037
pop ecx
mov ecx, 0x40c810
mov dword [0x40c830], ebp
mov dword [0x40c834], 0x8000
call fcn.004066cb
test eax, eax
jl 0x40360c
mov esi, dword [0x40c830]
sub esi, ebp
je 0x4035cd
lea eax, [esp + 0x10]
push ebx
push eax
push esi
push ebp
push dword [0x40a674]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403608
cmp esi, dword [esp + 0x10]
jne 0x403608
add dword [0x40c808], esi
cmp dword [0x40c82c], ebx
jne 0x403542
jmp 0x4035d9
cmp dword [0x40c82c], ebx
jne 0x40360c
cmp edi, ebx
je 0x40360c
mov eax, dword [0x41889c]
mov ecx, eax
sub ecx, dword [0x40c808]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x403506
push ebx
push ebx
push eax
push dword [0x40a674]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x403611
or eax, 0xffffffff
jmp 0x40361b
push 0xfffffffffffffffe
jmp 0x40360e
push 0xfffffffffffffffd
pop eax
jmp 0x40361b
push 1
call fcn.00403037
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x405909
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x423cf8], 0x44
push eax
xor eax, eax
push 0x423cf8
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405944
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4
Function at 0x405cd6
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x4230f8
push esi
call fcn.00406102
push esi
call fcn.00405c89
mov edi, eax
test edi, edi
jne 0x405cf7
xor eax, eax
jmp 0x405d49
push edi
call fcn.00406364
test byte [0x426318], 0x80
je 0x405d10
mov al, byte [edi]
test al, al
je 0x405cf3
cmp al, 0x5c
je 0x405cf3
sub edi, esi
jmp 0x405d28
call fcn.004065aa
test eax, eax
je 0x405d22
test byte [eax], 0x10
je 0x405cf3
push esi
call fcn.00405c3c
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405d14
call fcn.00405bf5
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405dba
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405dd6
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x405dd9
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x405e08
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405e4c
test edi, edi
jne 0x405e13
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405e46
Function at 0x405e50
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.004065d1
test eax, eax
mov esi, dword [esp + 0x18]
je 0x405e74
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405fad
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x423e80], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x423e80
je 0x405eb8
push 1
push 0
push esi
call fcn.00405dd9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405fb3
cmp eax, edi
jg 0x405fb3
mov esi, 0x4238f8
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405fb3
cmp eax, edi
jg 0x405fb3
push esi
push ebp
push str._s_s_r_n
push 0x4234f8
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x426310]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00406124
push 4
push 0xc0000000
push esi
call fcn.00405dd9
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x405fad
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405fa6
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405fa6
cmp edi, dword [esp + 0x18]
jne 0x405fa6
push str._Rename__r_n
push esi
call fcn.00405d4e
test eax, eax
jne 0x405fba
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00406102
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x4234f8
push eax
call fcn.00405d9a
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x426390]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x40aaf8
push eax
call fcn.00405d4e
test eax, eax
je 0x405f71
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405fe1
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405fd6
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x405f73
Function at 0x405fe9
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40605a
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406049
cmp dword [ebp + 0x14], 1
je 0x40604b
cmp dword [ebp + 0x14], 2
je 0x40604b
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x4063fd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x406422
mov eax, dword [0x40a8c8]
cmp eax, 0xffffffff
je 0x406419
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40a8c8], 0xffffffff
jmp 0x406495
cmp dword [0x424a80], ebx
je 0x406495
cmp byte [0x424680], bl
je 0x406461
cmp dword [0x40a8c8], 0xffffffff
jne 0x40646a
push 4
push 0x40000000
push 0x424680
call fcn.00405dd9
cmp eax, 0xffffffff
mov dword [0x40a8c8], eax
je 0x406495
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x40a8c8], 0xffffffff
je 0x406495
push esi
mov esi, 0x4252a0
push 0x40ab10
push esi
call sub.KERNEL32.dll_lstrcatA
lea eax, [ebp + 8]
push ebx
push eax
push esi
call sub.KERNEL32.dll_lstrlenA
push eax
push esi
push dword [0x40a8c8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebx
pop ebp
ret 4

Function at 0x40663d
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x424284], 0
push esi
jne 0x406674
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x40664e
mov dword [ecx*4 + 0x424280], eax
inc ecx
cmp ecx, 0x100
jl 0x406649
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x4066a5
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x424280]
xor eax, esi
inc ecx
dec edx
jne 0x406687
pop edi
not eax
pop esi
ret 0xc

Function at 0x1063e
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub edx, edx
inc edx
mov dword [ecx], eax
push esi
mov eax, dword [ecx]
push eax
pop esi
shr esi, 0x1e
sub esi, eax
imul esi, esi, 0x6c078965
sub ecx, 0xfffffffc
add esi, edx
inc edx
cmp edx, 0x270
mov dword [ecx], esi
jl 0x1064a
pop esi
pop ebp
ret 4

Function at 0x109b2
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
sub esi, esi
sub edx, edx
cmp dword [ebp + 0xc], esi
je 0x109da
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov cl, byte [edx + ecx]
add eax, esi
xor byte [eax], cl
lea eax, [edx + 1]
sub edx, edx
div dword [ebp + 0x14]
inc esi
cmp esi, dword [ebp + 0xc]
jne 0x109bf
pop esi
pop ebp
ret 0x10

Function at 0x16d14
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 0xc], 0
sub ecx, ecx
mov dword [ebp - 0x10], 1
sub eax, eax
mov dl, byte [eax + 0x735ec]
xor byte [ebp + ecx - 0x10], dl
inc ecx
inc eax
and eax, 0xf
cmp ecx, 8
jne 0x16d29
push ecx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 8]
mov dword [ebp - 4], 2
call fcn.0001340e
mov ecx, dword [0x777b4]
push eax
lea eax, [ebp - 4]
push eax
call fcn.00016b32
push eax
pop ecx
call fcn.00011e06
mov ecx, dword [ebp - 8]
or ecx, ecx
je 0x16d74
call fcn.00010990
leave
ret
Function at 0x403594
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x41c6d0
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41c701
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41c6e9
add dl, dl
jne 0x41c70c
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41c75d
xor eax, eax
add dl, dl
jne 0x41c719
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41c7fa
add dl, dl
jne 0x41c728
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41c733
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41c73e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41c749
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41c753
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41c6f8
mov eax, 1
add dl, dl
jne 0x41c76b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41c776
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41c762
sub eax, ebx
mov ebx, 1
jne 0x41c7a9
mov ecx, 1
add dl, dl
jne 0x41c78f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41c79a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41c786
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41c6f8
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41c7c0
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41c7cb
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41c7b7
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41c6f8
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41c81b
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41c6f8
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret