joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c260
Capabilities:
Copy file
Create process on windows
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x260
mov eax, dword [0x71cf78]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00605ec0
push 0x68ffbf
push dword [ebp + 0x10]
call fcn.0062c5cc
add esp, 0x14
push 0
push dword [ebp + 0xc]
test eax, eax
jne 0x40c2aa
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
jmp 0x40c2bc
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push esi
push 0
push 0x4000000
push 3
push 0
push 1
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 1
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0x44
mov esi, eax
lea eax, [ebp - 0x260]
push 0
push eax
call fcn.00605ec0
push dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x260], 0x44
push esi
push dword [ebp + 0xc]
mov word [ebp - 0x230], ax
xorps xmm0, xmm0
lea eax, [ebp - 0x20c]
push str._s__d___s_
push eax
movups xmmword [ebp - 0x21c], xmm0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x260]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test ebx, ebx
je 0x40c36b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40c376
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 8]
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c393
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c3ad
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
pop esi
pop ebx
jg 0x40c3c7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006026e7
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40c480
Capabilities:
Encode data using xor
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x66a3d5
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x71cf78]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push 0x8000000
push 3
push 0
push 3
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40c4de
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
call fcn.00423a7b
mov ecx, eax
test ecx, ecx
je 0x40c61a
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0
mov ecx, 1
test edi, edi
jle 0x40c54c
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x40c52b
push edi
lea ecx, [ebp - 0x10]
call fcn.00403540
mov esi, dword [ebp - 0x10]
push edi
push 0x20
push esi
call fcn.00605ec0
add esp, 0xc
cmp edi, dword [esi - 8]
jg 0x40c610
mov dword [esi - 0xc], edi
mov ecx, 1
mov byte [esi + edi], 0
mov dword [ebp - 4], 1
test edi, edi
js 0x40c610
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edi
or ecx, eax
jge 0x40c573
push edi
lea ecx, [ebp - 0x10]
call fcn.00403540
mov esi, dword [ebp - 0x10]
push 0
lea eax, [ebp - 0x14]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi - 8]
push esi
call fcn.0062ef98
add esp, 8
test eax, eax
js 0x40c610
cmp eax, dword [esi - 8]
jg 0x40c610
mov dword [esi - 0xc], eax
mov byte [eax + esi], 0
cmp edi, dword [ebp - 0x14]
je 0x40c5ae
xor edi, edi
jmp 0x40c5dd
or edx, 0xffffffff
mov ebx, esi
test edi, edi
je 0x40c5d1
movzx eax, byte [ebx]
lea ebx, [ebx + 1]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x72e718]
sub edi, 1
jne 0x40c5b7
mov eax, dword [ebp + 0xc]
not edx
mov edi, 1
mov dword [eax], edx
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40c5fc
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004020e0
push 0x80004005
call fcn.004020e0
int3
Function at 0x40caf0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
movzx eax, word [ebp + 0x10]
push ebx
push esi
push edi
push dword [ebp + 0x14]
mov edi, dword [ebp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [ebp + 0x14], 0
push esi
mov dword [ebp + 0x10], esi
call fcn.004206a6
push esi
mov edi, eax
push 0
push edi
call fcn.00605ec0
push esi
push ebx
push edi
call fcn.006053c0
add esp, 0x1c
test esi, esi
je 0x40cb9a
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x40cb9a
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004206af
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret 0x10
Function at 0x40d840
Capabilities:
Hash data using crc32b

Disassembly:
push ebp
mov ebp, esp
push ecx
xor ecx, ecx
mov dword [ebp - 4], ecx
push ebx
nop word [eax + eax]
xor eax, eax
test cl, 1
je 0x40d85b
bts eax, 7
shr ecx, 1
test cl, 1
je 0x40d866
bts eax, 6
shr ecx, 1
test cl, 1
je 0x40d871
bts eax, 5
shr ecx, 1
test cl, 1
je 0x40d87c
bts eax, 4
shr ecx, 1
test cl, 1
je 0x40d887
bts eax, 3
shr ecx, 1
test cl, 1
je 0x40d892
bts eax, 2
shr ecx, 1
test cl, 1
je 0x40d89d
bts eax, 1
test cl, 2
je 0x40d8a6
bts eax, 0
shl eax, 0x18
mov ecx, eax
add eax, eax
sar ecx, 0x1f
and ecx, 0x4c11db7
xor ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x4c11db7
lea eax, [ecx + ecx]
xor edx, eax
mov ecx, edx
sar ecx, 0x1f
and ecx, 0x4c11db7
lea eax, [edx + edx]
xor ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x4c11db7
lea eax, [ecx + ecx]
xor edx, eax
mov ecx, edx
sar ecx, 0x1f
and ecx, 0x4c11db7
lea eax, [edx + edx]
xor ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x4c11db7
lea eax, [ecx + ecx]
xor edx, eax
mov ecx, edx
sar ecx, 0x1f
and ecx, 0x4c11db7
lea eax, [edx + edx]
xor ecx, eax
mov ebx, ecx
sar ebx, 0x1f
and ebx, 0x4c11db7
lea eax, [ecx + ecx]
xor ebx, eax
xor edx, edx
lea ecx, [edx + 1]
nop dword [eax]
test bl, 1
je 0x40d93f
mov eax, 0x20
sub eax, ecx
bts edx, eax
inc ecx
shr ebx, 1
cmp ecx, 0x21
jl 0x40d930
mov ecx, dword [ebp - 4]
mov dword [ecx*4 + 0x72e718], edx
inc ecx
mov dword [ebp - 4], ecx
cmp ecx, 0xff
jle 0x40d850
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410e80
Capabilities:
Create thread

Disassembly:
cmp dword [0x72b0b4], 0
jne 0x410ea7
push 0
push 0
push ecx
push 0x411c10
push 0
push 0
mov dword [0x72b0b4], 1
call dword [sym.imp.KERNEL32.dll_CreateThread]
ret
Function at 0x416b20
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x71cf78]
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 0x416b54
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x416b54
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [ebx]
test al, al
je 0x416c1a
push edi
mov edi, ebx
mov ecx, ebx
cmp al, 0x2f
je 0x416b6b
cmp al, 0x5c
jne 0x416b6d
mov edi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x416b63
cmp edi, ebx
je 0x416bb0
sub edi, ebx
lea eax, [ebp - 0x20c]
push edi
push ebx
push eax
call fcn.006053c0
add esp, 0xc
cmp edi, 0x104
jae 0x416c2a
lea eax, [ebp - 0x20c]
mov byte [ebp + edi - 0x20c], 0
push eax
push esi
call fcn.00416b20
add esp, 8
mov byte [ebp - 0x108], 0
test esi, esi
je 0x416bd0
lea ecx, [ebp - 0x108]
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x416bc3
mov esi, ebx
mov al, byte [ebx]
inc ebx
test al, al
jne 0x416bd2
lea edi, [ebp - 0x108]
sub ebx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x416be2
mov ecx, ebx
lea eax, [ebp - 0x108]
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_GetFileAttributesA]
pop edi
cmp eax, 0xffffffff
jne 0x416c1a
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.006026e7
mov esp, ebp
pop ebp
ret
call fcn.00602dcd
int3

Function at 0x4175d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x417698
cmp dword [esi + 4], 0xffffffff
jne 0x417698
push edi
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417601
sub ecx, edx
mov al, byte [ecx + esi + 0x13f]
cmp al, 0x5c
je 0x417633
cmp al, 0x2f
je 0x417633
dec edi
nop word [eax + eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x417620
mov ax, word [0x690b4c]
mov word [edi], ax
mov edi, dword [ebp + 0x10]
cmp edi, 1
jne 0x417659
push edi
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x417659
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.0041a340
add esp, 0x10
test eax, eax
jne 0x417679
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebp
ret 0xc
push eax
call fcn.0041ace0
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 0x417dd0
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
xor ecx, dword [eax*4 + 0x6922e8]
movzx eax, cl
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
mov dword [edx], ecx
mov ecx, dword [edx + 8]
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6922e8]
mov dword [edx + 8], ecx
pop ebp
ret
Function at 0x41a470
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, esi
imul ebx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
cmp byte [edi], 0
je 0x41a4ae
push 0
lea eax, [ebp + 0xc]
push eax
push ebx
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41a4a2
mov byte [edi + 8], 1
mov eax, dword [ebp + 0xc]
xor edx, edx
pop edi
div esi
pop esi
pop ebx
pop ebp
ret
mov edx, dword [edi + 0x1c]
mov esi, dword [edi + 0x18]
mov ecx, dword [edi + 0x14]
sub esi, edx
lea eax, [edx + ebx]
cmp eax, dword [edi + 0x18]
cmovbe esi, ebx
add ecx, edx
push esi
push ecx
push dword [ebp + 8]
call fcn.006053c0
add dword [edi + 0x1c], esi
add esp, 0xc
mov eax, esi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x41a66e
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
not eax
cmp esi, 8
jb 0x41a72d
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 + 0x6922e8]
movzx ecx, byte [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
movzx ecx, byte [edx + 2]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
movzx ecx, byte [edx + 3]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
movzx ecx, byte [edx + 4]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
movzx ecx, byte [edx + 5]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
movzx ecx, byte [edx + 6]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
movzx ecx, byte [edx + 7]
add edx, 8
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
sub edi, 1
jne 0x41a686
pop edi
test esi, esi
je 0x41a74b
movzx ecx, byte [edx]
lea edx, [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x6922e8]
sub esi, 1
jne 0x41a731
not eax
pop esi
pop ebp
ret
Function at 0x41d520
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x41d52e
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
not eax
cmp esi, 8
jb 0x41d5ed
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 + 0x694048]
movzx ecx, byte [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
movzx ecx, byte [edx + 2]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
movzx ecx, byte [edx + 3]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
movzx ecx, byte [edx + 4]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
movzx ecx, byte [edx + 5]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
movzx ecx, byte [edx + 6]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
movzx ecx, byte [edx + 7]
add edx, 8
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
sub edi, 1
jne 0x41d546
pop edi
test esi, esi
je 0x41d60b
movzx ecx, byte [edx]
lea edx, [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x694048]
sub esi, 1
jne 0x41d5f1
not eax
pop esi
pop ebp
ret
Function at 0x41de90
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 eax, dword [esi + 0x6af90]
mov dword [esi + 0x6af80], 2
test eax, eax
je 0x41e0ae
cmp eax, 3
jb 0x41df06
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 0x41df44
mov eax, dword [esi + 0x6af84]
sub eax, ebx
cmp eax, 0x7efa
ja 0x41df44
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x41df2d
mov dword [esi + 0x6afa0], eax
push ebx
push esi
call fcn.0041eb40
mov ecx, dword [esi + 0x6af90]
mov edi, eax
add esp, 8
cmp edi, ecx
cmova edi, ecx
mov ecx, dword [esi + 0x6af84]
cmp edi, 3
jb 0x41e02a
sub ecx, dword [esi + 0x6af88]
lea eax, [edi - 3]
push eax
push ecx
push esi
call fcn.0041d930
mov ecx, dword [esi + 0x6af90]
add esp, 0xc
sub ecx, edi
mov dword [ebp + 8], eax
mov dword [esi + 0x6af90], ecx
cmp edi, dword [esi + 0x6af98]
ja 0x41dfe9
cmp ecx, 3
jb 0x41dfe9
dec edi
nop word [eax + eax]
inc dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af84]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
movzx ecx, byte [edx + esi + 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 0x41df90
jmp 0x41e047
add dword [esi + 0x6af84], edi
xor edi, edi
mov eax, dword [esi + 0x6af84]
push str.Call_UPDATE_HASH___MIN_MATCH_3_more_times
push 1
push esi
movzx ecx, byte [eax + esi + 0x1af70]
mov dword [esi + 0x6af7c], ecx
movzx eax, byte [eax + esi + 0x1af71]
shl ecx, 5
xor eax, ecx
mov dword [esi + 0x6af7c], eax
call fcn.0041c320
add esp, 0xc
jmp 0x41e04d
movzx eax, byte [ecx + esi + 0x1af70]
push eax
push 0
push esi
call fcn.0041d930
add esp, 0xc
mov dword [ebp + 8], eax
dec dword [esi + 0x6af90]
inc dword [esi + 0x6af84]
cmp dword [ebp + 8], 0
mov eax, dword [esi + 0x6af84]
je 0x41e08a
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
js 0x41e06d
lea edx, [esi + 0x1af70]
add edx, ecx
jmp 0x41e06f
xor edx, edx
push 0
sub eax, ecx
push eax
push edx
push esi
call fcn.0041e300
mov eax, dword [esi + 0x6af84]
add esp, 0x10
mov dword [esi + 0x6af74], eax
mov eax, dword [esi + 0x6af90]
cmp eax, 0x106
jae 0x41e0a6
push esi
call fcn.0041e190
mov eax, dword [esi + 0x6af90]
add esp, 4
test eax, eax
jne 0x41deb5
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
js 0x41e0c2
lea edx, [esi + 0x1af70]
add edx, ecx
jmp 0x41e0c4
xor edx, edx
mov eax, dword [esi + 0x6af84]
push 1
sub eax, ecx
push eax
push edx
push esi
call fcn.0041e300
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x41fad0
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 0x41fb32
mov ecx, dword [edi + 0x8c]
mov ebx, dword [edi + 0x88]
cmp ecx, ebx
jae 0x41fb79
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.006053c0
add dword [edi + 0x8c], ebx
add dword [edi + 0x74], ebx
push ebx
push esi
push dword [edi + 0x78]
call fcn.0041d520
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 0x41fb72
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 0x41fb79
mov esi, dword [ebp - 4]
add dword [edi + 0x74], esi
push esi
push ebx
push dword [edi + 0x78]
call fcn.0041d520
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 0x4200e0
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
xor ecx, dword [eax*4 + 0x694048]
movzx eax, cl
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
mov dword [edx], ecx
mov ecx, dword [edx + 8]
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x694048]
mov dword [edx + 8], ecx
pop ebp
ret
Function at 0x420130
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
cmp byte [esi + 0x2d], 0
je 0x4201b2
mov ecx, dword [esi + 0x3c]
mov eax, ecx
test ecx, ecx
je 0x420164
cmp dword [esi + 0x40], ebx
jae 0x420164
push ecx
call fcn.004206af
add esp, 4
mov dword [esi + 0x3c], 0
jmp 0x420168
test eax, eax
jne 0x42017a
lea eax, [ebx + ebx]
push eax
call fcn.004206a6
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], ebx
push ebx
push edi
push eax
call fcn.006053c0
add esp, 0xc
xor edi, edi
test ebx, ebx
je 0x4201af
lea ecx, [esi + 0x30]
nop
mov eax, dword [esi + 0x3c]
movzx eax, byte [edi + eax]
push eax
push ecx
call fcn.00420220
mov ecx, dword [esi + 0x3c]
add esp, 8
mov byte [edi + ecx], al
inc edi
lea ecx, [esi + 0x30]
cmp edi, ebx
jb 0x420190
mov edi, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4201ed
mov edx, dword [esi + 0x24]
lea eax, [edx + ebx]
cmp eax, dword [esi + 0x28]
jb 0x4201d4
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.006053c0
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 0x42020d
push 0
lea ecx, [ebp + 8]
push ecx
push ebx
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 0x42722e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor esi, esi
mov ebx, ecx
push edi
cmp dword [ebp + 8], esi
je 0x42726d
call fcn.0043005b
push 0xf0
push dword [ebp + 8]
mov edi, dword [eax + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x42726d
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x427275
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
push esi
mov ecx, ebx
call fcn.00423f6a
pop edi
pop esi
pop ebx
pop ebp
ret 4