joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402b7b
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x45dd34], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
jne 0x402bdd
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, 0x44b400
lea edi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0xc]
push ecx
push eax
movsw word es:[edi], word [esi]
call fcn.00401972
pop ecx
pop ecx
pop edi
jmp 0x402bd7
push str.ReloadCfg
push esi
call fcn.004019b5
pop ecx
pop ecx
test eax, eax
lea eax, [ebp - 0xc]
push eax
push esi
je 0x402bed
call fcn.00401972
pop ecx
pop ecx
mov esi, eax
test esi, esi
jne 0x402bba
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0042c3ca
leave
ret
call fcn.00401972
test eax, eax
pop ecx
pop ecx
je 0x402bdd
push dword [ebp + 0xc]
push eax
push ebx
call fcn.0042d39e
xor eax, eax
add esp, 0xc
inc eax
jmp 0x402bdf

Function at 0x402d7d
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x198]
sub esp, 0x218
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp + 0x194], eax
mov eax, dword [ebp + 0x1a0]
push ebx
push esi
push edi
push 0x2001f
mov ebx, ecx
push eax
push dword [ebx]
xor esi, esi
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x70], esi
call fcn.00401ab1
mov edi, eax
cmp edi, esi
je 0x402de5
lea ecx, [ebp - 0x70]
call fcn.00401a4c
mov eax, edi
mov ecx, dword [ebp + 0x194]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042c3ca
add ebp, 0x198
leave
ret 4
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
jmp 0x402dfd
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x70]
call fcn.00402d7d
cmp eax, esi
jne 0x402e30
lea eax, [ebp - 0x80]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x6c]
push eax
push esi
push dword [ebp - 0x70]
mov dword [ebp - 0x74], 0x100
call edi
test eax, eax
je 0x402ded
lea ecx, [ebp - 0x70]
call fcn.00401a4c
push dword [ebp - 0x78]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea ecx, [ebp - 0x70]
mov esi, eax
call fcn.00401a4c
mov eax, esi
jmp 0x402dcb

Function at 0x403c2a
Capabilities:
Create thread

Disassembly:
push ecx
push esi
push edi
xor edi, edi
push edi
push edi
push edi
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, edi
mov dword [esi + 0x30], eax
jne 0x403c46
xor eax, eax
jmp 0x403c6d
push ebx
lea eax, [esp + 0xc]
push eax
push edi
push esi
push 0x402ec9
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
cmp ebx, edi
jne 0x403c6a
push dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop ebx
pop edi
pop esi
pop ecx
ret
Function at 0x409375
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push edi
xor edi, edi
cmp dword [ebp + 8], edi
je 0x40942a
cmp dword [ebp + 0xc], edi
je 0x40942a
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0xc]
push eax
xor ebx, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
push edi
jmp 0x409404
cmp ebx, edi
je 0x4093c0
push ebx
call fcn.0042c2b3
pop ecx
xor ebx, ebx
cmp dword [ebp - 4], edi
je 0x4093d1
push dword [ebp - 4]
call fcn.0042c2b3
pop ecx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x409411
push dword [ebp - 0xc]
call fcn.0042c1f0
mov ebx, eax
mov eax, dword [ebp - 8]
add eax, eax
push eax
call fcn.0042c1f0
pop ecx
pop ecx
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0xc]
push eax
push ebx
push dword [ebp + 8]
push edi
call esi
cmp eax, edi
mov dword [ebp - 0x10], eax
je 0x4093b3
push dword [ebp - 4]
call fcn.0042c2b3
mov eax, dword [ebp - 0x10]
cmp eax, edi
pop ecx
je 0x409426
mov ecx, dword [ebp + 0xc]
mov dword [ecx], ebx
pop esi
pop ebx
jmp 0x40942c
xor eax, eax
pop edi
leave
ret
Function at 0x409d6b
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp - 4], eax
and word [ebp - 0x20c], 0
push esi
mov esi, dword [ebp + 8]
push edi
push 0x206
lea eax, [ebp - 0x20a]
push 0
push eax
call fcn.0042c350
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0042df93
add esp, 0x14
xor eax, eax
lea edi, [ebp + eax*2 - 0x20c]
push 0x5c
push edi
call fcn.0042dfaf
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x409dd7
push 0x2f
push edi
call fcn.0042dfaf
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x409ddb
and word [esi], 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x409dfe
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x409e16
test esi, esi
je 0x409e1a
mov eax, esi
lea ecx, [ebp - 0x20c]
sub eax, ecx
sar eax, 1
inc eax
mov word [esi], 0x5c
jmp 0x409db0
xor eax, eax
jmp 0x409e1d
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0042c3ca
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
and dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
jne 0x40a083
mov eax, dword [ebp - 4]
jmp 0x40a15d
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
shr ecx, 3
xor eax, 0xffffffff
test ecx, ecx
je 0x40a138
push ebp
mov ebp, ecx
xor edx, edx
xor ecx, ecx
nop
mov ebx, dword [esi]
add esi, 4
mov dl, bl
mov cl, bh
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x44bc20]
shr ebx, 0x10
xor eax, edi
xor cl, al
shr eax, 8
mov edi, dword [ecx*4 + 0x44bc20]
mov dl, bl
xor eax, edi
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x44bc20]
mov cl, bh
xor eax, edi
mov ebx, dword [esi]
xor cl, al
shr eax, 8
mov edi, dword [ecx*4 + 0x44bc20]
add esi, 4
xor eax, edi
mov dl, bl
mov cl, bh
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x44bc20]
shr ebx, 0x10
xor eax, edi
xor cl, al
shr eax, 8
mov edi, dword [ecx*4 + 0x44bc20]
mov dl, bl
xor eax, edi
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x44bc20]
mov cl, bh
xor eax, edi
xor cl, al
shr eax, 8
xor eax, dword [ecx*4 + 0x44bc20]
dec ebp
jne 0x40a0a2
pop ebp
mov ecx, dword [ebp + 0x10]
xor edx, edx
and ecx, 7
je 0x40a154
mov dl, byte [esi]
inc esi
xor dl, al
shr eax, 8
xor eax, dword [edx*4 + 0x44bc20]
dec ecx
jne 0x40a142
xor eax, 0xffffffff
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a162
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
jne 0x40a19d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40a237
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
ja 0x40a1b7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40a236
mov eax, 0x2800
cmp esi, eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], eax
jae 0x40a1c9
mov dword [ebp - 4], esi
push dword [ebp - 4]
call fcn.0042dbe5
mov edi, eax
cmp edi, ebx
pop ecx
je 0x40a1b3
push dword [ebp - 4]
push ebx
push edi
call fcn.0042c350
add esp, 0xc
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], ebx
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a1b3
push dword [ebp - 8]
push edi
push dword [ebp - 0xc]
call fcn.0040a06a
add esp, 0xc
sub esi, dword [ebp - 8]
mov dword [ebp - 0xc], eax
jne 0x40a1d8
push 0x10
push dword [ebp + 0xc]
push eax
call fcn.0042e041
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0042d399
xor eax, eax
pop ecx
inc eax
pop esi
pop edi
pop ebx
leave
ret
Function at 0x40a257
Capabilities:
Acquire debug privileges

Disassembly:
push ebx
xor ebx, ebx
cmp dword [esp + 8], ebx
jne 0x40a264
xor eax, eax
pop ebx
ret
push esi
push edi
mov edi, 0x124
push edi
call fcn.0042c1f0
mov esi, eax
cmp esi, ebx
pop ecx
jne 0x40a27f
xor eax, eax
jmp 0x40a448
push ebp
push edi
push ebx
push esi
call fcn.0042c350
mov edi, dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
add esp, 0xc
lea eax, [esi + 4]
push eax
push str.SeTcbPrivilege
push ebx
mov dword [esi], 0x17
call edi
lea eax, [esi + 0x10]
push eax
push str.SeCreateTokenPrivilege
push ebx
mov dword [esi + 0xc], ebx
call edi
lea eax, [esi + 0x1c]
push eax
push str.SeTakeOwnershipPrivilege
push ebx
mov dword [esi + 0x18], ebx
call edi
lea eax, [esi + 0x28]
push eax
push str.SeCreatePagefilePrivilege
push ebx
mov dword [esi + 0x24], ebx
call edi
lea eax, [esi + 0x34]
push eax
push str.SeLockMemoryPrivilege
push ebx
mov dword [esi + 0x30], ebx
call edi
lea eax, [esi + 0x40]
push eax
push str.SeAssignPrimaryTokenPrivilege
push ebx
mov dword [esi + 0x3c], ebx
call edi
lea eax, [esi + 0x4c]
push eax
push str.SeIncreaseQuotaPrivilege
push ebx
mov dword [esi + 0x48], ebx
call edi
lea eax, [esi + 0x58]
push eax
push str.SeIncreaseBasePriorityPrivilege
push ebx
mov dword [esi + 0x54], ebx
call edi
lea eax, [esi + 0x64]
push eax
push str.SeCreatePermanentPrivilege
push ebx
mov dword [esi + 0x60], ebx
call edi
lea eax, [esi + 0x70]
push eax
push str.SeDebugPrivilege
push ebx
mov dword [esi + 0x6c], ebx
call edi
push 3
pop ebp
lea eax, [esi + 0x7c]
push eax
push str.SeAuditPrivilege
push ebx
mov dword [esi + 0x78], ebp
call edi
lea eax, [esi + 0x88]
push eax
push str.SeSecurityPrivilege
push ebx
mov dword [esi + 0x84], ebx
call edi
lea eax, [esi + 0x94]
push eax
push str.SeSystemEnvironmentPrivilege
push ebx
mov dword [esi + 0x90], ebx
call edi
lea eax, [esi + 0xa0]
push eax
push str.SeChangeNotifyPrivilege
push ebx
mov dword [esi + 0x9c], ebx
call edi
lea eax, [esi + 0xac]
push eax
push str.SeBackupPrivilege
push ebx
mov dword [esi + 0xa8], ebp
call edi
lea eax, [esi + 0xb8]
push eax
push str.SeRestorePrivilege
push ebx
mov dword [esi + 0xb4], ebx
call edi
lea eax, [esi + 0xc4]
push eax
push str.SeShutdownPrivilege
push ebx
mov dword [esi + 0xc0], ebx
call edi
lea eax, [esi + 0xd0]
push eax
push str.SeLoadDriverPrivilege
push ebx
mov dword [esi + 0xcc], ebx
call edi
lea eax, [esi + 0xdc]
push eax
push str.SeProfileSingleProcessPrivilege
push ebx
mov dword [esi + 0xd8], ebx
call edi
lea eax, [esi + 0xe8]
push eax
push str.SeSystemtimePrivilege
push ebx
mov dword [esi + 0xe4], ebx
call edi
lea eax, [esi + 0xf4]
push eax
push str.SeUndockPrivilege
push ebx
mov dword [esi + 0xf0], ebx
call edi
lea eax, [esi + 0x100]
push eax
push str.SeImpersonatePrivilege
push ebx
mov dword [esi + 0xfc], ebx
call edi
lea eax, [esi + 0x10c]
push eax
push str.SeCreateGlobalPrivilege
push ebx
mov dword [esi + 0x108], ebp
call edi
mov eax, dword [esp + 0x14]
mov dword [esi + 0x114], ebp
mov dword [eax], esi
xor eax, eax
inc eax
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40a5d8
Capabilities:
Enumerate processes

Disassembly:
push ebp
lea ebp, [esp - 0x1b4]
sub esp, 0x234
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp + 0x1b0], eax
push ebx
push esi
mov esi, dword [ebp + 0x1bc]
push edi
mov edi, dword [ebp + 0x1c0]
xor ebx, ebx
push 0x228
lea eax, [ebp - 0x78]
push ebx
push eax
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
call fcn.0042c350
add esp, 0xc
cmp esi, ebx
jne 0x40a624
xor eax, eax
jmp 0x40a67c
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40a620
lea eax, [ebp - 0x7c]
push eax
push ebx
mov dword [ebp - 0x7c], 0x22c
call sub.KERNEL32.dll_Process32FirstW
jmp 0x40a660
lea eax, [ebp - 0x58]
push esi
push eax
call fcn.0042e1fa
test eax, eax
pop ecx
pop ecx
je 0x40a666
lea eax, [ebp - 0x7c]
push eax
push ebx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40a646
jmp 0x40a672
mov eax, dword [ebp - 0x74]
mov dword [edi], eax
mov dword [ebp - 0x80], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp + 0x1b0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042c3ca
add ebp, 0x1b4
leave
ret

Function at 0x40af06
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 4], 0
and dword [eax], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
ret 4

Function at 0x40de21
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x108
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp + 0x84], eax
push ebx
push esi
mov esi, dword [ebp + 0x90]
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x7f]
push ebx
push eax
mov byte [ebp - 0x80], bl
call fcn.0042c350
add esp, 0xc
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push 0x23
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
lea eax, [ebp - 0x80]
jl 0x40de7c
push eax
push esi
call fcn.0042e7f0
pop ecx
pop ecx
jmp 0x40deaf
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str.Application_Data
lea eax, [ebp - 0x80]
push 0x5c
push eax
call fcn.0042ea90
pop ecx
pop ecx
inc eax
push eax
call fcn.0042e7f0
lea eax, [ebp - 0x80]
push eax
push esi
call fcn.0042e7f0
add esp, 0x10
mov ecx, dword [ebp + 0x84]
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0042c3ca
add ebp, 0x88
leave
ret
Function at 0x40ea3d
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 8]
test edx, edx
jne 0x40ea48
xor eax, eax
ret
mov eax, dword [esp + 0xc]
cmp eax, 8
push ebx
push esi
mov esi, dword [esp + 0xc]
not esi
mov ecx, 0xff
jb 0x40eb03
push edi
mov edi, eax
shr edi, 3
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
sub eax, 8
dec edi
jne 0x40ea68
pop edi
test eax, eax
je 0x40eb1c
movzx ebx, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x44dbb8]
inc edx
dec eax
jne 0x40eb07
mov eax, esi
pop esi
not eax
pop ebx
ret

Function at 0x40eb23
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [ecx]
movzx edx, byte [esp + 8]
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x44dbb8]
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 [edx*4 + 0x44dbb8]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x40efd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x40f004
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40efff
mov byte [esi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x40f02c
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x40f015
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0042e290
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop esi
pop ebp
ret
Function at 0x40fdb8
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
push esi
mov esi, dword [ebp + 0xc]
je 0x40fdec
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40fdec
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx ecx, word [esi]
test cx, cx
je 0x40fe97
mov eax, esi
mov edx, esi
movzx ecx, cx
cmp cx, 0x2f
je 0x40fe0b
cmp cx, 0x5c
jne 0x40fe0d
mov eax, edx
inc edx
inc edx
movzx ecx, word [edx]
test cx, cx
jne 0x40fdff
cmp eax, esi
je 0x40fe4c
sub eax, esi
sar eax, 1
push edi
add eax, eax
mov edi, eax
push edi
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.0042e290
and word [ebp + edi - 0x414], 0
lea eax, [ebp - 0x414]
push eax
push ebx
call fcn.0040fdb8
add esp, 0x14
pop edi
and word [ebp - 0x20c], 0
test ebx, ebx
je 0x40fe67
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0042df93
pop ecx
pop ecx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0042df69
pop ecx
pop ecx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40fe97
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0042c3ca
leave
ret

Function at 0x41147f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x41152c
cmp dword [esi + 4], 0xffffffff
jne 0x41152c
push edi
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push edi
call fcn.0042d1db
movzx eax, word [esi + eax*2 + 0x242]
cmp ax, 0x5c
pop ecx
je 0x4114d3
cmp ax, 0x2f
je 0x4114d3
push 0x44bbec
push edi
call fcn.0042df69
pop ecx
pop ecx
cmp dword [ebp + 0x10], 1
pop edi
jne 0x4114f5
push 1
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4114f5
mov eax, 0x2000000
jmp 0x411531
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040edfe
add esp, 0x10
test eax, eax
jne 0x411513
mov eax, dword [ebp + 0x10]
jmp 0x411531
push eax
call fcn.00410f62
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
pop ecx
add eax, 0x200
jmp 0x411531
mov eax, 0x1000000
pop esi
pop ebp
ret 0xc
Function at 0x411edc
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [ecx]
movzx edx, byte [esp + 8]
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x44e3a0]
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 [edx*4 + 0x44e3a0]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x411f87
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [ebp + 0xc]
je 0x411ffc
mov eax, dword [esi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x411fb3
cmp dword [esi + 0x40], edi
jae 0x411fb3
push eax
call fcn.0042c0c6
pop ecx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x3c], ebx
jne 0x411fc8
lea eax, [edi + edi]
push eax
call fcn.0042cca0
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x3c]
call fcn.0042e290
add esp, 0xc
test edi, edi
jbe 0x411ff9
mov eax, dword [esi + 0x3c]
movzx eax, byte [ebx + eax]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.00411f28
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x411fdb
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x41202b
mov eax, dword [esi + 0x24]
lea ebx, [eax + edi]
cmp ebx, dword [esi + 0x28]
jb 0x412017
mov dword [esi + 0x14], 0x30000
jmp 0x41204d
push edi
push edx
add eax, ecx
push eax
call fcn.0042e290
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
jmp 0x41204f
mov eax, dword [esi + 4]
test eax, eax
je 0x412046
push 0
lea ecx, [ebp + 8]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x41204f
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x412f28
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x14]
test eax, eax
mov dword [esi], vtable.CClientMgr.0
je 0x412f6a
push 0xfa0
push eax
mov dword [esi + 0x18], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x412f5d
push 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 0x14], 0
lea ecx, [esi + 4]
pop esi
jmp fcn.00412dd3

Function at 0x41363e
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [ebp + 8]
lea ecx, [ebp - 4]
push ecx
mov dword [esi + 0x10], eax
xor eax, eax
push eax
push esi
push 0x41361b
push eax
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x14], eax
xor eax, eax
pop esi
leave
ret 4
Function at 0x4138fe
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x45c530]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x10
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.0042c350
add esp, 0xc
lea eax, [ebp - 0x1a4]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x41399b
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, 0x2382
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x41399b
push ebx
mov word [ebp - 0x14], 2
call dword [sym.imp.WS2_32.dll_htons]
push 0x44e7bc
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
push 0x10
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
push esi
je 0x4139af
call edi
inc ebx
cmp ebx, 0x23f0
jl 0x413945
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0x251c
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042c3ca
leave
ret
call edi
mov eax, ebx
jmp 0x4139a0