joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b7a3d
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x55e0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
lea ecx, [ebp - 0x254]
push edi
mov edi, dword [ebp + 8]
call fcn.004b8559
lea ecx, [ebp - 0x254]
call fcn.004b8f7c
push str.SeDebugPrivilege
lea ecx, [ebp - 0x254]
call fcn.004b8938
call fcn.004afc69
push eax
lea ecx, [ebp - 0x23c]
call fcn.004af046
lea eax, [ebp - 0x23c]
mov ecx, esi
push eax
call fcn.004b7c52
test eax, eax
jns 0x4b7b3a
lea eax, [ebp - 0x23c]
mov ecx, esi
push eax
call fcn.004b797e
test eax, eax
jns 0x4b7b3a
and dword [ebp - 0x238], 0
mov ecx, esi
and dword [ebp - 8], 0
call fcn.004b7921
push eax
lea ecx, [ebp - 0x238]
call fcn.004b76ec
test eax, eax
jne 0x4b7af6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4b7aef
call fcn.004b447d
mov esi, eax
jmp 0x4b7b0e
mov esi, 0x80004005
jmp 0x4b7b0e
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x238]
call fcn.004b7b82
mov esi, eax
test esi, esi
jns 0x4b7b25
cmp dword [ebp - 0x238], 0
je 0x4b7b55
push dword [ebp - 0x238]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4b7b55
cmp dword [ebp - 0x238], 0
je 0x4b7b3a
push dword [ebp - 0x238]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x23c]
call fcn.004b676a
lea eax, [ebp - 0x23c]
mov ecx, edi
push eax
call fcn.004af1ff
xor esi, esi
mov ecx, dword [ebp - 0x23c]
add ecx, 0xfffffff0
call fcn.004b05d5
lea ecx, [ebp - 0x254]
call fcn.004b8599
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.004dbbe3
mov esp, ebp
pop ebp
ret 4

Function at 0x4b7c52
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push edi
mov edi, ecx
lea ecx, [ebp - 0x18]
call fcn.004b8559
lea ecx, [ebp - 0x18]
call fcn.004b8f7c
push str.SeDebugPrivilege
lea ecx, [ebp - 0x18]
call fcn.004b8938
mov ecx, edi
call fcn.004b7921
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x4b7cae
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4b7ca7
call fcn.004b447d
mov edi, eax
jmp 0x4b7d05
mov edi, 0x80004005
jmp 0x4b7d05
cmp dword [edi + 0x18], 0
jne 0x4b7ce6
push 0x533a3c
lea ecx, [edi + 0x14]
call fcn.004b7e7c
test eax, eax
jns 0x4b7ce6
mov ecx, dword [ebp + 8]
mov edi, 0x7ff7
push edi
call fcn.004b04ad
push edi
push eax
push 0
push esi
call sub.PSAPI.DLL_GetModuleFileNameExW
mov ecx, dword [ebp + 8]
push eax
call fcn.004b5fc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4b7cf9
call fcn.004b447d
mov edi, eax
jmp 0x4b7cfe
mov edi, 0x80004005
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x18]
call fcn.004b8599
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x4b94a7
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x55e0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0x2f
pop edx
push 0x5c
pop esi
mov dword [ebp - 0x418], esi
test ebx, ebx
je 0x4b954c
push 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.004de70c
lea eax, [ebp - 0x20c]
push eax
call fcn.004db28a
add esp, 0x10
test eax, eax
je 0x4b9529
movzx ecx, word [ebp + eax*2 - 0x20e]
push 0x2f
pop edx
cmp cx, dx
je 0x4b950d
cmp cx, si
jne 0x4b9529
lea eax, [eax*2 - 2]
cmp eax, 0x208
jae 0x4b963b
xor ecx, ecx
mov word [ebp + eax - 0x20c], cx
lea eax, [ebp - 0x20c]
push eax
call fcn.004b9641
pop ecx
test al, al
jne 0x4b9549
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x2f
pop edx
movzx eax, word [edi]
test ax, ax
je 0x4b962a
mov esi, edi
mov ecx, edi
cmp ax, dx
je 0x4b956a
cmp ax, word [ebp - 0x418]
jne 0x4b956c
mov esi, ecx
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x4b955c
cmp esi, edi
je 0x4b95b6
sub esi, edi
lea eax, [ebp - 0x20c]
and esi, 0xfffffffe
push esi
push edi
push eax
call fcn.004dcd00
add esp, 0xc
cmp esi, 0x208
jae 0x4b963b
xor eax, eax
mov word [ebp + esi - 0x20c], ax
lea eax, [ebp - 0x20c]
push eax
push ebx
call fcn.004b94a7
pop ecx
pop ecx
xor eax, eax
mov esi, 0x104
mov word [ebp - 0x414], ax
test ebx, ebx
je 0x4b95d9
push esi
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.004de70c
add esp, 0xc
xor eax, eax
mov word [ebp - 0x20e], ax
lea eax, [ebp - 0x414]
push eax
call fcn.004db28a
sub esi, eax
push esi
push edi
lea eax, [ebp + eax*2 - 0x414]
push eax
call fcn.004de70c
xor eax, eax
mov word [ebp - 0x20e], ax
lea eax, [ebp - 0x414]
push eax
call fcn.004b9641
add esp, 0x14
test al, al
jne 0x4b962a
push 0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004dbbe3
mov esp, ebp
pop ebp
ret
call fcn.004de385
int3

Function at 0x4b9641
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne al
pop ebp
ret
Function at 0x4b9eb7
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, ecx
cmp dword [edi], 0
jne 0x4b9f65
cmp dword [edi + 4], 0xffffffff
jne 0x4b9f65
push esi
lea esi, [edi + 0x244]
push esi
push 0x103
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
call fcn.004db28a
pop ecx
pop esi
lea eax, [edi + eax*2]
movzx ecx, word [eax + 0x242]
cmp ecx, 0x5c
je 0x4b9f13
push 0x2f
pop edx
cmp cx, dx
je 0x4b9f13
xor ecx, ecx
mov word [eax + 0x244], dx
mov word [eax + 0x246], cx
cmp dword [ebp + 0x10], 1
jne 0x4b9f2e
push dword [ebp + 8]
call fcn.004b9e49
pop ecx
cmp eax, 0xffffffff
jne 0x4b9f2e
mov eax, 0x2000000
jmp 0x4b9f6a
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004bc699
add esp, 0x10
test eax, eax
jne 0x4b9f4c
mov eax, dword [ebp - 4]
jmp 0x4b9f6a
push eax
call fcn.004bce64
pop ecx
xor ecx, ecx
mov dword [edi], eax
test eax, eax
mov edx, 0x200
cmove ecx, edx
mov eax, ecx
jmp 0x4b9f6a
mov eax, 0x1000000
pop edi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4ba4e0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

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

Function at 0x4bc78b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
imul esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
cmp byte [edi], 0
je 0x4bc7bf
push 0
lea eax, [ebp + 0x10]
push eax
push esi
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4bc7ba
mov byte [edi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x4bc7e6
mov edx, dword [edi + 0x1c]
lea eax, [edx + esi]
cmp eax, dword [edi + 0x18]
jbe 0x4bc7cf
mov esi, dword [edi + 0x18]
sub esi, edx
mov ecx, dword [edi + 0x14]
push esi
add ecx, edx
push ecx
push dword [ebp + 8]
call fcn.004dcd00
add esp, 0xc
mov eax, esi
add dword [edi + 0x1c], esi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x4bc90b
xor eax, eax
pop ebp
ret
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
not ecx
mov ebx, 0xff
cmp esi, 8
jb 0x4bc9c6
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
dec edi
jne 0x4bc929
pop edi
test esi, esi
je 0x4bc9df
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x533c78]
inc edx
dec esi
jne 0x4bc9ca
not ecx
pop esi
mov eax, ecx
pop ebx
pop ebp
ret
Function at 0x4bebf1
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x55e0a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4bec34
mov eax, 0x200
jmp 0x4beda8
mov eax, dword [ebp - 0x38]
xor ecx, ecx
push esi
inc ecx
mov edx, eax
and edx, ecx
push 0
pop esi
cmovne esi, ecx
test al, 2
je 0x4bec4c
or esi, 2
test al, 4
je 0x4bec53
or esi, 4
mov ecx, eax
and ecx, 0x10
je 0x4bec5d
or esi, 0x10
test al, 0x20
je 0x4bec64
or esi, 0x20
test ecx, ecx
je 0x4bec70
or esi, 0x40000000
jmp 0x4bec76
or esi, 0x80000000
or esi, 0x1000000
test edx, edx
jne 0x4bec86
or esi, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x3c], eax
cmp eax, 0x28
jbe 0x4bed37
xor eax, eax
push eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 2
lea eax, [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x58]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 0x40], ax
jne 0x4bed34
mov ecx, dword [ebp - 0x58]
lea eax, [ecx + 0x34]
cmp dword [ebp - 0x3c], eax
jbe 0x4bed34
push 0
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x48]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x48]
cmp eax, 0x5a4d
je 0x4bed2e
cmp eax, 0x454e
je 0x4bed2e
cmp eax, 0x454c
je 0x4bed2e
cmp eax, 0x4550
jne 0x4bed34
or esi, 0x400000
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x4bed40
mov dword [ecx], esi
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x4bed49
mov dword [ecx], eax
test ebx, ebx
je 0x4bed79
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.004c00b7
push dword [ebp - 0x20]
mov dword [ebx], eax
push dword [ebp - 0x24]
call fcn.004c00b7
push dword [ebp - 0x30]
mov dword [ebx + 4], eax
push dword [ebp - 0x34]
call fcn.004c00b7
add esp, 0x18
mov dword [ebx + 8], eax
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x4beda5
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call fcn.004c0044
movzx ecx, word [ebp - 0x40]
add esp, 0x10
movzx eax, word [ebp - 0x3c]
shl ecx, 0x10
or ecx, eax
mov dword [esi], ecx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004dbbe3
mov esp, ebp
pop ebp
ret
Function at 0x4bf650
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x4bf65e
xor eax, eax
pop ebp
ret
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
not ecx
mov ebx, 0xff
cmp esi, 8
jb 0x4bf719
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
dec edi
jne 0x4bf67c
pop edi
test esi, esi
je 0x4bf732
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
and eax, ebx
xor ecx, dword [eax*4 + 0x535fe8]
inc edx
dec esi
jne 0x4bf71d
not ecx
pop esi
mov eax, ecx
pop ebx
pop ebp
ret
Function at 0x4bfe07
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov ecx, edi
mov ebx, edi
mov dword [ebp - 4], ecx
mov dword [esi + 0x6af80], 2
jmp 0x4c000a
cmp dword [esi + 0x6af90], 3
jb 0x4bfe84
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 eax, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af7c]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x6af84]
mov dword [esi + ecx*4 + 0x4af70], eax
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x4bfec1
mov eax, dword [esi + 0x6af84]
sub eax, ecx
cmp eax, 0x7efa
ja 0x4bfec1
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x4bfeab
mov dword [esi + 0x6afa0], eax
push ecx
push esi
call fcn.004c098b
pop ecx
pop ecx
mov ecx, dword [esi + 0x6af90]
mov ebx, eax
cmp ebx, ecx
cmova ebx, ecx
cmp ebx, 3
jb 0x4bff95
lea eax, [ebx - 3]
push eax
mov eax, dword [esi + 0x6af84]
sub eax, dword [esi + 0x6af88]
push eax
push esi
call fcn.004bf969
sub dword [esi + 0x6af90], ebx
add esp, 0xc
mov dword [ebp + 8], eax
cmp ebx, dword [esi + 0x6af98]
ja 0x4bff5c
cmp dword [esi + 0x6af90], 3
jb 0x4bff5c
dec ebx
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 eax, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af7c]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x6af84]
mov dword [esi + ecx*4 + 0x4af70], eax
dec ebx
jne 0x4bfeff
mov eax, dword [ebp + 8]
jmp 0x4bffb4
add dword [esi + 0x6af84], ebx
mov ebx, 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 0x4bffba
mov eax, dword [esi + 0x6af84]
movzx eax, byte [eax + esi + 0x1af70]
push eax
push edi
push esi
call fcn.004bf969
add esp, 0xc
dec dword [esi + 0x6af90]
inc dword [esi + 0x6af84]
test eax, eax
je 0x4bfff4
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
js 0x4bffd2
lea edx, [esi + 0x1af70]
add edx, ecx
jmp 0x4bffd4
mov edx, edi
mov eax, dword [esi + 0x6af84]
push edi
sub eax, ecx
push eax
push edx
push esi
call fcn.004c0219
mov eax, dword [esi + 0x6af84]
add esp, 0x10
mov dword [esi + 0x6af74], eax
cmp dword [esi + 0x6af90], 0x106
jae 0x4c0007
push esi
call fcn.004c00db
pop ecx
mov ecx, dword [ebp - 4]
cmp dword [esi + 0x6af90], edi
jne 0x4bfe29
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
js 0x4c0028
lea edi, [esi + 0x1af70]
add edi, ecx
mov eax, dword [esi + 0x6af84]
push 1
sub eax, ecx
push eax
push edi
push esi
call fcn.004c0219
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c085f
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ebx - 1]
cmp eax, 7
jbe 0x4c087d
mov dword [esi + 0x6afa4], str.bad_pack_level
xor edi, edi
mov dword [esi + 0x6af78], edi
cmp dword [esi + 0x6af70], edi
jne 0x4c08a1
mov dword [esi + 0x6af78], 1
mov dword [esi + 0x6af70], 0x10000
push 0x1fffc
lea eax, [esi + 0x4af70]
mov dword [esi + 0x6af6c], edi
push edi
push eax
call fcn.004dbc00
movzx eax, word [ebx*8 + 0x535f9a]
add esp, 0xc
mov dword [esi + 0x6af98], eax
movzx eax, word [ebx*8 + 0x535f98]
mov dword [esi + 0x6af9c], eax
movzx eax, word [ebx*8 + 0x535f9c]
push 2
mov dword [esi + 0x6afa0], eax
movzx eax, word [ebx*8 + 0x535f9e]
pop ecx
mov dword [esi + 0x6af94], eax
cmp ebx, ecx
jg 0x4c0904
mov eax, dword [ebp + 0x10]
or word [eax], 4
jmp 0x4c090f
cmp ebx, 8
jl 0x4c090f
mov eax, dword [ebp + 0x10]
or word [eax], cx
push 0x10000
lea ebx, [esi + 0x1af70]
mov dword [esi + 0x6af84], edi
push ebx
push esi
mov dword [esi + 0x6af74], edi
call dword [esi + 0xc]
add esp, 0xc
mov dword [esi + 0x6af90], eax
test eax, eax
je 0x4c0976
cmp eax, 0xffffffff
je 0x4c0976
mov dword [esi + 0x6af8c], edi
cmp eax, 0x106
jae 0x4c0951
push esi
call fcn.004c00db
pop ecx
mov dword [esi + 0x6af7c], edi
mov ecx, edi
movzx eax, byte [ebx + edi]
shl ecx, 5
xor ecx, eax
and ecx, 0x7fff
inc edi
mov dword [esi + 0x6af7c], ecx
cmp edi, 2
jb 0x4c0959
jmp 0x4c0986
mov dword [esi + 0x6af8c], 1
mov dword [esi + 0x6af90], edi
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4c16a8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 0x78]
test ecx, ecx
je 0x4c16f8
mov eax, dword [edi + 0x80]
mov esi, dword [edi + 0x7c]
cmp eax, esi
jae 0x4c1735
sub esi, eax
cmp esi, dword [ebp + 0xc]
cmova esi, dword [ebp + 0xc]
add eax, ecx
push esi
push eax
push dword [ebp + 8]
call fcn.004dcd00
add dword [edi + 0x80], esi
add dword [edi + 0x68], esi
push esi
push dword [ebp + 8]
push dword [edi + 0x6c]
call fcn.004bf650
add esp, 0x18
mov dword [edi + 0x6c], eax
mov eax, esi
jmp 0x4c1737
cmp dword [edi + 0x70], 0
je 0x4c172e
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 0x70]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4c1735
mov esi, dword [ebp - 4]
add dword [edi + 0x68], esi
push esi
push dword [ebp + 8]
push dword [edi + 0x6c]
call fcn.004bf650
add esp, 0xc
jmp 0x4c16f1
mov dword [edi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8

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

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

Function at 0x4c1bda
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp byte [esi + 0x2d], 0
je 0x4c1c53
cmp dword [esi + 0x3c], 0
je 0x4c1c0c
cmp dword [esi + 0x40], edi
jae 0x4c1c06
push dword [esi + 0x3c]
call fcn.004daf7e
and dword [esi + 0x3c], 0
pop ecx
cmp dword [esi + 0x3c], 0
jne 0x4c1c1c
lea eax, [edi + edi]
push eax
call fcn.004dbda6
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push ebx
push dword [esi + 0x3c]
call fcn.004dcd00
add esp, 0xc
xor ebx, ebx
test edi, edi
je 0x4c1c50
lea ecx, [esi + 0x30]
mov eax, dword [esi + 0x3c]
movzx eax, byte [ebx + eax]
push eax
push ecx
call fcn.004c1cad
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
lea ecx, [esi + 0x30]
cmp ebx, edi
jb 0x4c1c32
mov ebx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4c1c82
mov edx, dword [esi + 0x24]
lea eax, [edx + edi]
cmp eax, dword [esi + 0x28]
jb 0x4c1c6e
mov dword [esi + 0x14], 0x30000
jmp 0x4c1ca4
push edi
add ecx, edx
push ebx
push ecx
call fcn.004dcd00
add esp, 0xc
mov eax, edi
add dword [esi + 0x24], edi
jmp 0x4c1ca6
mov eax, dword [esi + 4]
test eax, eax
je 0x4c1c9d
push 0
lea ecx, [ebp + 8]
push ecx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x4c1ca6
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x4c213c
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x264
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
call fcn.004afc69
push eax
lea ecx, [ebp - 4]
call fcn.004af046
call fcn.004afc69
push eax
lea ecx, [ebp - 0x14]
call fcn.004af046
xor ebx, ebx
push ebx
push dword [ebp + 8]
call fcn.004be9a5
mov dword [esi + 0x20c], eax
pop ecx
pop ecx
test eax, eax
jne 0x4c2187
mov esi, dword [ebp - 4]
jmp 0x4c232d
push edi
call fcn.004afc69
push eax
lea ecx, [ebp - 8]
call fcn.004af046
mov edi, dword [ebp + 0xc]
push 0x5c
push dword [edi]
call fcn.004db2c2
pop ecx
pop ecx
test eax, eax
je 0x4c21e1
mov edx, dword [edi]
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x4c21e1
lea ecx, [eax + 1]
mov eax, dword [edx - 0xc]
sub eax, ecx
push eax
push ecx
lea eax, [ebp - 0xc]
mov ecx, edi
push eax
call fcn.004b0156
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 8]
call fcn.004af1ff
mov ecx, dword [ebp - 0xc]
lea ecx, [ecx - 0x10]
call fcn.004b05d5
jmp 0x4c21ea
push edi
lea ecx, [ebp - 8]
call fcn.004af1ff
mov eax, dword [0x561078]
mov esi, dword [0x561074]
cmp esi, eax
je 0x4c2215
mov edi, eax
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.004b05d5
add esi, 4
cmp esi, edi
jne 0x4c21fb
mov esi, dword [0x561074]
mov edi, dword [ebp + 0xc]
mov dword [0x561078], esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x4c2301
push edi
lea ecx, [ebp - 4]
call fcn.004af1ff
mov esi, dword [ebp - 4]
cmp dword [esi - 4], 1
jle 0x4c224b
push dword [esi - 0xc]
lea ecx, [ebp - 4]
call fcn.004afb22
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
add eax, 4
push esi
push eax
mov dword [ebp + 0xc], eax
call fcn.004dedc9
pop ecx
pop ecx
push 0xffffffffffffffff
lea ecx, [ebp - 4]
call fcn.004b5fc5
cmp dword [esi - 4], 1
jle 0x4c227b
push dword [esi - 0xc]
lea ecx, [ebp - 4]
call fcn.004afb22
mov esi, dword [ebp - 4]
push ebx
push 0x4c2359
lea eax, [ebp - 0x264]
push eax
push esi
call fcn.004c2528
mov ecx, dword [0x561078]
add esp, 0x10
mov edi, dword [0x561074]
mov eax, ecx
sub eax, edi
test eax, 0xfffffffc
je 0x4c22fc
cmp edi, ecx
je 0x4c22f7
push dword [ebp + 0xc]
call fcn.004db28a
pop ecx
mov ebx, eax
mov ecx, edi
add ebx, ebx
call fcn.004b563c
add eax, 2
lea ecx, [ebp - 8]
add eax, ebx
push eax
call fcn.004b071e
push dword [edi]
mov eax, dword [ebp - 0x10]
push dword [ebp - 8]
push dword [eax + 0x20c]
call fcn.004bef4c
add esp, 0xc
test eax, eax
jne 0x4c2355
add edi, 4
cmp edi, dword [0x561078]
jne 0x4c22ac
xor ebx, ebx
jmp 0x4c231a
mov eax, dword [ebp + 0xc]
jmp 0x4c231a
or ebx, 0xffffffff
jmp 0x4c2321
push dword [edi]
mov eax, dword [ebp - 0x10]
push dword [ebp - 8]
push dword [eax + 0x20c]
call fcn.004bef4c
mov esi, dword [ebp - 4]
add esp, 0xc
test eax, eax
jne 0x4c2321
xor ebx, ebx
inc ebx
mov ecx, dword [ebp - 8]
lea ecx, [ecx - 0x10]
call fcn.004b05d5
pop edi
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.004b05d5
lea ecx, [esi - 0x10]
call fcn.004b05d5
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004b05d5
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
xor ebx, ebx
jmp 0x4c2321