joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407430
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
cmp dword [esi], 0
jne 0x407465
lea eax, [ebp + 0xc]
mov dword [esi + 4], 0
push eax
push 0
push esi
push dword [ebp + 0x10]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi], eax
test eax, eax
je 0x407472
mov eax, 1
pop esi
pop ebp
ret
push str.Thread_is_Running
call fcn.004074c0
add esp, 4
xor eax, eax
pop esi
pop ebp
ret

Function at 0x4074c0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00407b80
cmp dword [eax + 0x622c], 1
jne 0x40755b
push esi
push str._IG____________middle_
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [ebp - 0x804]
lea esi, [esi + eax*2]
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
push 0x3ff
push esi
call fcn.00409190
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.004414e7
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x407544
cmp eax, 0x3ff
ja 0x407544
jne 0x40754d
xor eax, eax
mov word [esi + 0x7fe], ax
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x407b2e
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
push edi
push 0
test eax, eax
jne 0x407b50
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 4]
push ecx
push dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4082e0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4dc
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
call fcn.00407b80
mov edi, dword [esi + 0x2d8]
cmp edi, 1
movzx ecx, byte [esi + 0x2cb]
push ecx
movzx ecx, byte [esi + 0x2ca]
mov dword [ebp - 0x4d8], eax
mov eax, 2
cmovg edi, eax
movzx eax, byte [esi + 0x2c9]
push ecx
push eax
movzx eax, byte [esi + 0x2c8]
push eax
movzx eax, byte [esi + 0x2c7]
push eax
movzx eax, byte [esi + 0x2c6]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push eax
lea eax, [ebp - 0xc4]
push str._02X_02X_02X_02X_02X_02X
push eax
call esi
push edi
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0x44]
push str._s__d
push eax
call esi
lea eax, [ebp - 0x44]
push eax
push str.Item_s
call fcn.004074c0
mov eax, dword [ebp - 0x4d8]
add esp, 0x38
add eax, 0x424
mov dword [ebp - 0x4dc], eax
push eax
push 0x104
lea eax, [ebp - 0x2cc]
push eax
push 0x463ffc
lea eax, [ebp - 0x44]
push eax
push str.NandMap
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x2cc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x408425
mov word [ebp - 0xb0], ax
lea eax, [ebp - 0xc4]
push edi
push eax
lea eax, [ebp - 0x44]
push str._s__d
push eax
call esi
lea eax, [ebp - 0x44]
push eax
push str.Item_Retry_s
call fcn.004074c0
add esp, 0x18
lea eax, [ebp - 0x2cc]
push dword [ebp - 0x4dc]
push 0x104
push eax
push 0x463ffc
lea eax, [ebp - 0x44]
push eax
push str.NandMap
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x2cc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x408459
lea eax, [ebp - 0x2cc]
push eax
mov eax, dword [ebp - 0x4d8]
add eax, 0x21c
push eax
lea eax, [ebp - 0x4d4]
push 0x46487c
push eax
call esi
lea eax, [ebp - 0x4d4]
push eax
call fcn.004086f0
add esp, 0x14
test eax, eax
jne 0x40846c
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x4d4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret
Function at 0x408760
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x28]
push ecx
push 0x28
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea eax, [ebp - 0x30]
push eax
push str.SeShutdownPrivilege
push 0x463ffc
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x14], 1
push eax
push 0x10
lea eax, [ebp - 0x14]
mov dword [ebp - 0xc], ecx
push eax
push 0
push dword [ebp - 0x28]
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret

Function at 0x408920
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push edi
cmp eax, 0x40000000
jne 0x408935
mov ecx, 2
jmp 0x40893c
cmp eax, 4
jne 0x40897c
mov ecx, eax
push 0
push 0x80
push ecx
push 0
push 0
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40897c
push esi
push 0
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ebp
ret
xor eax, eax
pop edi
pop ebp
ret

Function at 0x408a70
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1254
call fcn.0040b200
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push eax
push ebx
lea eax, [ebp - 0x804]
push 0x46487c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x1254]
push eax
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x408b19
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
nop dword [eax + eax]
test byte [ebp - 0x1254], 0x10
jne 0x408b03
lea eax, [ebp - 0x1228]
push eax
push ebx
lea eax, [ebp - 0x1004]
push 0x46487c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x1254]
push eax
push esi
call edi
test eax, eax
jne 0x408ad0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret
Function at 0x408e10
Capabilities:
Create directory
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
movzx eax, word [ebp + 0xc]
push eax
push 0
mov dword [ebp - 0x210], ecx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebx, eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00408bf0
add esp, 8
lea eax, [ebp - 0x20c]
push str.ReleasePackage.a
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
push esi
lea eax, [ebp - 0x20c]
push 0x40000000
push eax
call fcn.00408920
mov esi, dword [ebp - 0x210]
add esp, 0x10
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 1
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00408ee0
mov ecx, dword [ebp - 4]
add esp, 0xc
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret

Function at 0x408ee0
Capabilities:
Create directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
push esi
call fcn.00411f50
mov ebx, eax
push edi
push ebx
call fcn.00412080
lea eax, [ebp - 0x43c]
push eax
push 0xffffffffffffffff
push ebx
call fcn.00411dd0
mov edi, dword [ebp - 0x43c]
add esp, 0x1c
xor esi, esi
test edi, edi
jle 0x408f58
lea eax, [ebp - 0x43c]
push eax
push esi
push ebx
call fcn.00411dd0
lea eax, [ebp - 0x438]
push eax
push esi
push ebx
call fcn.00412610
inc esi
add esp, 0x18
cmp esi, edi
jl 0x408f34
push ebx
call fcn.00411e30
add esp, 4
push ebx
test al, al
je 0x408f6d
call fcn.00411260
jmp 0x408f72
call fcn.0040d200
add esp, 4
cmp dword [ebp + 0x10], 0
pop edi
pop esi
pop ebx
je 0x408f8b
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
not eax
push esi
mov esi, dword [ebp + 8]
test edx, edx
je 0x40909d
movzx ecx, byte [esi]
lea esi, [esi + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x464000]
sub edx, 1
jne 0x409083
not eax
pop esi
pop ebp
ret

Function at 0x4090b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
not eax
test edx, edx
je 0x4090de
push esi
mov esi, dword [ebp + 8]
movzx ecx, byte [esi]
lea esi, [esi + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x464400]
sub edx, 1
jne 0x4090c3
pop esi
not eax
pop ebp
ret
Function at 0x40e410
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x40e41e
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
not eax
cmp esi, 8
jb 0x40e4dd
push edi
mov edi, esi
shr edi, 3
movzx ecx, byte [edx]
sub esi, 8
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
movzx ecx, byte [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
movzx ecx, byte [edx + 2]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
movzx ecx, byte [edx + 3]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
movzx ecx, byte [edx + 4]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
movzx ecx, byte [edx + 5]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
movzx ecx, byte [edx + 6]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
movzx ecx, byte [edx + 7]
add edx, 8
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
sub edi, 1
jne 0x40e436
pop edi
test esi, esi
je 0x40e4fb
movzx ecx, byte [edx]
lea edx, [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4663f0]
sub esi, 1
jne 0x40e4e1
not eax
pop esi
pop ebp
ret
Function at 0x40ecc0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
xor edi, edi
mov dword [esi + 0x6af80], 2
cmp dword [esi + 0x6af90], ebx
je 0x40eecc
cmp dword [esi + 0x6af90], 3
jb 0x40ed38
mov edx, dword [esi + 0x6af84]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
movzx ecx, byte [edx + esi + 0x1af72]
xor ecx, eax
and ecx, 0x7fff
and edx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov ebx, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], ebx
mov ecx, dword [esi + 0x6af7c]
mov eax, dword [esi + 0x6af84]
mov dword [esi + ecx*4 + 0x4af70], eax
test ebx, ebx
je 0x40ed76
mov eax, dword [esi + 0x6af84]
sub eax, ebx
cmp eax, 0x7efa
ja 0x40ed76
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x40ed5f
mov dword [esi + 0x6afa0], eax
push ebx
push esi
call fcn.0040f9a0
mov ecx, dword [esi + 0x6af90]
mov edi, eax
add esp, 8
cmp edi, ecx
cmova edi, ecx
cmp edi, 3
jb 0x40ee49
lea eax, [edi - 3]
push eax
mov eax, dword [esi + 0x6af84]
sub eax, dword [esi + 0x6af88]
push eax
push esi
call fcn.0040e7d0
sub dword [esi + 0x6af90], edi
add esp, 0xc
mov dword [ebp + 8], eax
cmp edi, dword [esi + 0x6af98]
ja 0x40ee10
cmp dword [esi + 0x6af90], 3
jb 0x40ee10
dec edi
inc dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af84]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
movzx ecx, byte [esi + edx + 0x1af72]
and edx, 0x7fff
xor ecx, eax
and ecx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov ebx, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], ebx
mov ecx, dword [esi + 0x6af7c]
mov eax, dword [esi + 0x6af84]
mov dword [esi + ecx*4 + 0x4af70], eax
sub edi, 1
jne 0x40edb4
mov eax, dword [ebp + 8]
jmp 0x40ee69
add dword [esi + 0x6af84], edi
xor edi, edi
mov eax, dword [esi + 0x6af84]
movzx ecx, byte [eax + esi + 0x1af70]
mov dword [esi + 0x6af7c], ecx
movzx eax, byte [eax + esi + 0x1af71]
shl ecx, 5
xor eax, ecx
and eax, 0x7fff
mov dword [esi + 0x6af7c], eax
mov eax, dword [ebp + 8]
jmp 0x40ee6f
mov eax, dword [esi + 0x6af84]
movzx eax, byte [eax + esi + 0x1af70]
push eax
push 0
push esi
call fcn.0040e7d0
add esp, 0xc
dec dword [esi + 0x6af90]
inc dword [esi + 0x6af84]
test eax, eax
je 0x40eeaa
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
js 0x40ee87
lea edx, [esi + 0x1af70]
add edx, ecx
jmp 0x40ee89
xor edx, edx
mov eax, dword [esi + 0x6af84]
push 0
sub eax, ecx
push eax
push edx
push esi
call fcn.0040f110
mov eax, dword [esi + 0x6af84]
add esp, 0x10
mov dword [esi + 0x6af74], eax
cmp dword [esi + 0x6af90], 0x106
jae 0x40eebf
push esi
call fcn.0040efb0
add esp, 4
cmp dword [esi + 0x6af90], 0
jne 0x40ece3
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
js 0x40eee0
lea edx, [esi + 0x1af70]
add edx, ecx
jmp 0x40eee2
xor edx, edx
mov eax, dword [esi + 0x6af84]
push 1
sub eax, ecx
push eax
push edx
push esi
call fcn.0040f110
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x410980
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov edx, dword [edi + 0x84]
test edx, edx
je 0x4109e2
mov ecx, dword [edi + 0x8c]
mov ebx, dword [edi + 0x88]
cmp ecx, ebx
jae 0x410a29
mov esi, dword [ebp + 8]
lea eax, [ecx + edx]
sub ebx, ecx
cmp ebx, dword [ebp + 0xc]
cmova ebx, dword [ebp + 0xc]
push ebx
push eax
push esi
call fcn.00416880
add dword [edi + 0x8c], ebx
add dword [edi + 0x74], ebx
push ebx
push esi
push dword [edi + 0x78]
call fcn.0040e410
add esp, 0x18
mov dword [edi + 0x78], eax
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi + 0x7c]
test eax, eax
je 0x410a22
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 4]
push 0
push ecx
push dword [ebp + 0xc]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x410a29
mov esi, dword [ebp - 4]
add dword [edi + 0x74], esi
push esi
push ebx
push dword [edi + 0x78]
call fcn.0040e410
add esp, 0xc
mov dword [edi + 0x78], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [edi + 0x14], 0x1000000
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8

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

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
movsx eax, byte [ebp + 0xc]
mov ecx, dword [edx]
xor eax, ecx
movzx eax, al
shr ecx, 8
mov eax, dword [eax*4 + 0x4663f0]
xor eax, ecx
mov ecx, dword [edx + 8]
mov dword [edx], eax
movzx eax, al
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4663f0]
mov dword [edx + 8], ecx
pop ebp
ret
Function at 0x410fb0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
cmp byte [esi + 0x2d], 0
je 0x411088
mov eax, dword [esi + 0x3c]
mov ebx, dword [ebp + 0xc]
test eax, eax
je 0x410fe4
cmp dword [esi + 0x40], ebx
jae 0x410fe4
push eax
call fcn.00460588
add esp, 4
mov dword [esi + 0x3c], 0
cmp dword [esi + 0x3c], 0
jne 0x410ffc
lea eax, [ebx + ebx]
push eax
call fcn.0040b2e8
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], ebx
push ebx
push edi
push dword [esi + 0x3c]
call fcn.00416880
xor edx, edx
add esp, 0xc
mov dword [ebp + 8], edx
test ebx, ebx
je 0x411085
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x30]
shr ecx, 8
mov bl, byte [edx + eax]
mov edx, dword [esi + 0x38]
mov edi, edx
movsx eax, bl
and edi, 0xfffd
xor eax, dword [esi + 0x30]
or edi, 2
movzx eax, al
mov eax, dword [eax*4 + 0x4663f0]
xor eax, ecx
mov ecx, edi
mov dword [esi + 0x30], eax
xor ecx, 1
movzx eax, al
add eax, dword [esi + 0x34]
imul eax, eax, 0x8088405
imul ecx, edi
inc eax
mov dword [esi + 0x34], eax
shr eax, 0x18
xor eax, edx
shr ecx, 8
movzx eax, al
xor cl, bl
shr edx, 8
xor edx, dword [eax*4 + 0x4663f0]
mov dword [esi + 0x38], edx
mov edx, dword [ebp + 8]
mov eax, dword [esi + 0x3c]
mov byte [edx + eax], cl
inc edx
mov dword [ebp + 8], edx
cmp edx, dword [ebp + 0xc]
jb 0x411012
mov edi, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4110c6
mov edx, dword [esi + 0x24]
mov ebx, dword [ebp + 0xc]
lea eax, [edx + ebx]
cmp eax, dword [esi + 0x28]
jb 0x4110ad
pop edi
mov dword [esi + 0x14], 0x30000
xor eax, eax
pop esi
pop ebx
pop ebp
ret 8
push ebx
add ecx, edx
push edi
push ecx
call fcn.00416880
add esp, 0xc
mov eax, ebx
add dword [esi + 0x24], ebx
pop edi
pop esi
pop ebx
pop ebp
ret 8
mov eax, dword [esi + 4]
test eax, eax
je 0x4110e8
push 0
lea ecx, [ebp + 8]
push ecx
push dword [ebp + 0xc]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
pop ebp
ret 8
pop edi
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop esi
pop ebx
pop ebp
ret 8
Function at 0x411310
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x411344
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x411344
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x41142c
push edi
mov edi, ebx
mov ecx, ebx
cmp ax, 0x2f
je 0x411361
cmp ax, 0x5c
jne 0x411363
mov edi, ecx
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x411355
cmp edi, ebx
je 0x4113af
sub edi, ebx
lea eax, [ebp - 0x414]
and edi, 0xfffffffe
push edi
push ebx
push eax
call fcn.00416880
add esp, 0xc
cmp edi, 0x208
jae 0x41143c
xor eax, eax
mov word [ebp + edi - 0x414], ax
lea eax, [ebp - 0x414]
push eax
push esi
call fcn.00411310
add esp, 8
xor eax, eax
mov word [ebp - 0x20c], ax
test esi, esi
je 0x4113d4
lea ecx, [ebp - 0x20c]
sub ecx, esi
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x4113c4
mov esi, ebx
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x4113d6
lea edi, [ebp - 0x20c]
sub ebx, esi
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4113f0
mov ecx, ebx
lea eax, [ebp - 0x20c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop edi
cmp eax, 0xffffffff
jne 0x41142c
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.0040b1e5
mov esp, ebp
pop ebp
ret
call fcn.0040b413
int3

Function at 0x411e50
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x411f1d
cmp dword [esi + 4], 0xffffffff
jne 0x411f1d
push edi
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x411e81
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x411eb8
cmp eax, 0x2f
je 0x411eb8
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x411ea5
mov eax, dword [0x46875c]
mov dword [edi], eax
mov edi, dword [ebp + 0x10]
cmp edi, 1
jne 0x411ede
push edi
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x411ede
pop edi
mov eax, 0x2000000
pop esi
pop ebp
ret 0xc
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00415030
add esp, 0x10
test eax, eax
jne 0x411efe
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebp
ret 0xc
push eax
call fcn.00415a30
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov edx, 0x200
test eax, eax
cmove ecx, edx
pop edi
mov eax, ecx
pop esi
pop ebp
ret 0xc
mov eax, 0x1000000
pop esi
pop ebp
ret 0xc
Function at 0x412a30
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
movsx eax, byte [ebp + 0xc]
mov ecx, dword [edx]
xor eax, ecx
movzx eax, al
shr ecx, 8
mov eax, dword [eax*4 + 0x466f20]
xor eax, ecx
mov ecx, dword [edx + 8]
mov dword [edx], eax
movzx eax, al
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x466f20]
mov dword [edx + 8], ecx
pop ebp
ret