joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c1e10
Capabilities:
Create process memory minidump

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x538088
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5ba11c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
sub esp, 8
mov dword [ebp - 4], 0
push 0x80
push ecx
push 1
push 0x40000000
push ecx
lea ecx, [ebp - 0x18]
call fcn.004880b0
mov ebx, dword [ebp - 0x18]
mov esi, eax
test esi, esi
jns 0x4c1f1e
call fcn.004d03a0
mov edi, eax
mov ecx, edi
call fcn.004d0140
cmp byte [0x5c2271], 0
jne 0x4c1ed1
mov ecx, 0xf0
call fcn.004d0a00
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x4c1ec6
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x5c2271
sub esp, 0xc
push 0x4c
push str.C:BuildAgentwork4d643bb3f4c71f96CommonDebugHelper.cpp
push 8
call fcn.004d0210
jmp 0x4c1ec8
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x5c53c0], eax
mov ecx, edi
call fcn.004d0150
mov ecx, dword [0x5c53c0]
lea ecx, [ecx + 0xd0]
call fcn.004d0140
mov eax, dword [0x5c53c0]
push esi
push str.Create_dump_file_failed___u_
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov ecx, dword [0x5c53c0]
add esp, 0xc
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x5c53c0]
lea ecx, [ecx + 0xd0]
call fcn.004d0150
jmp 0x4c203d
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [edi]
push 0x5c41e0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
call fcn.004d377e
add esp, 4
test eax, eax
je 0x4c1f4a
push eax
call fcn.004d341e
add esp, 4
push 0
push 0
lea eax, [ebp - 0x24]
push eax
push 0x50
push ebx
push dword [edi + 8]
push dword [edi + 4]
call dword [sym.imp.dbghelp.dll_MiniDumpWriteDump]
mov esi, eax
push 0x5c41e0
mov byte [ebp - 4], 2
call fcn.004d37a3
add esp, 4
test eax, eax
je 0x4c1f81
push eax
call fcn.004d341e
add esp, 4
mov byte [ebp - 4], 0
test esi, esi
jne 0x4c203b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.004d03a0
mov edi, eax
mov ecx, edi
call fcn.004d0140
cmp byte [0x5c226f], 0
jne 0x4c1ff1
mov ecx, 0xf0
call fcn.004d0a00
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4c1fe6
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x5c226f
sub esp, 0xc
push 0x60
push str.C:BuildAgentwork4d643bb3f4c71f96CommonDebugHelper.cpp
push 8
call fcn.004d0210
jmp 0x4c1fe8
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x5c53cc], eax
mov ecx, edi
call fcn.004d0150
mov ecx, dword [0x5c53cc]
lea ecx, [ecx + 0xd0]
call fcn.004d0140
mov eax, dword [0x5c53cc]
push esi
push str.Write_dump_failed___u_
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov ecx, dword [0x5c53cc]
add esp, 0xc
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x5c53cc]
lea ecx, [ecx + 0xd0]
call fcn.004d0150
jmp 0x4c203d
xor esi, esi
test ebx, ebx
je 0x4c2048
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c3d80
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x538339
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push esi
push edi
mov eax, dword [0x5ba11c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
push eax
push 0
push dword [edx]
xorps xmm0, xmm0
mov dword [ebp - 0x38], 0
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x24], xmm0
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x30], 6
mov dword [ebp - 0x10], 0
call dword [sym.imp.WS2_32.dll_GetAddrInfoW]
mov dword [ebp - 4], 1
call fcn.0044d220
mov ecx, eax
test ecx, ecx
je 0x4c3ed5
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edx, [eax + 0x10]
mov dword [edi], edx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x10]
mov esi, eax
mov dword [ebp - 0x14], 1
test esi, esi
je 0x4c3e3d
nop dword [eax]
cmp dword [esi + 4], 2
je 0x4c3e57
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4c3e30
push eax
call dword [sym.imp.WS2_32.dll_FreeAddrInfoW]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x18], 0x30
mov ecx, 1
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, 0x30
or eax, ecx
jge 0x4c3e7b
push 0x30
mov ecx, edi
call fcn.004536f0
mov edx, dword [edi]
lea eax, [ebp - 0x18]
push eax
push edx
push 0
push dword [esi + 0x10]
push dword [esi + 0x18]
call dword [sym.imp.WS2_32.dll_WSAAddressToStringW]
mov dword [ebp - 4], 2
mov eax, dword [edi]
test eax, eax
jne 0x4c3e9f
xor ecx, ecx
jmp 0x4c3eb1
push dword [eax - 8]
push eax
call fcn.004f5e70
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4c3ecb
mov eax, dword [edi]
cmp ecx, dword [eax - 8]
jg 0x4c3ecb
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x10]
jmp 0x4c3e3d
push 0x80070057
call fcn.0044a700
push 0x80004005
call fcn.0044a700
int3
Function at 0x4c5430
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a170
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x5ba11c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 4], 0
mov ecx, dword [esi + 8]
push 0xf003f
push 0
call fcn.004c17f0
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x20], edi
xor ebx, ebx
mov byte [ebp - 4], 1
test edi, edi
setne bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4c549c
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x4c554d
push 0x10000
push dword [esi + 4]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x24], esi
xor ebx, ebx
mov byte [ebp - 4], 2
test esi, esi
setne bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4c54d5
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x4c5563
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
neg eax
sbb ebx, ebx
neg ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4c54fc
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x4c5579
jmp 0x4c551d
test esi, esi
je 0x4c552c
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4c5532
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x4c5539
push edi
call esi
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 eax
lea ecx, [ebp - 0x14]
call fcn.0044a6e0
push 0x5b6dcc
mov eax, ecx
push eax
call fcn.004edba4
push eax
lea ecx, [ebp - 0x18]
call fcn.0044a6e0
push 0x5b6dcc
mov eax, ecx
push eax
call fcn.004edba4
push eax
lea ecx, [ebp - 0x1c]
call fcn.0044a6e0
push 0x5b6dcc
mov eax, ecx
push eax
call fcn.004edba4
int3
Function at 0x4c5590
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a198
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5ba11c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], 0
call fcn.00453d40
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
mov eax, ecx
not eax
cmp eax, 1
jb 0x4c574c
lea eax, [ecx + 1]
push ecx
push eax
lea ecx, [ebp - 0x1c]
call fcn.004bb800
test al, al
je 0x4c5756
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x4c5760
mov edx, dword [ebp - 0x1c]
lea edi, [ebp + 0x24]
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x20]
mov dword [edx], eax
mov eax, dword [ebp + 0x1c]
mov dword [edx + 4], eax
cmp ebx, 0xffffffff
je 0x4c566b
nop dword [eax]
mov eax, dword [edi]
mov esi, ecx
cmp esi, dword [ebp - 0x14]
jb 0x4c5655
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004bc330
test al, al
je 0x4c5756
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edi]
add edi, 8
mov dword [edx + esi*8], ebx
inc ecx
mov dword [edx + esi*8 + 4], eax
mov dword [ebp - 0x18], ecx
mov ebx, dword [edi - 4]
cmp ebx, 0xffffffff
jne 0x4c5630
mov esi, dword [ebp + 8]
mov dword [ebp - 0x24], ecx
push 0xf003f
push 0
mov ecx, dword [esi + 8]
mov dword [ebp - 0x20], edx
call fcn.004c17f0
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
xor eax, eax
test edi, edi
setne al
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x4c56ab
movzx ebx, bx
or ebx, 0x80070000
cmp dword [ebp + 0xc], 0
je 0x4c5725
push 0xf01ff
push dword [esi + 4]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
xor eax, eax
test esi, esi
setne al
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x4c56e1
movzx ebx, bx
or ebx, 0x80070000
cmp dword [ebp + 0xc], 0
je 0x4c571a
lea eax, [ebp - 0x30]
push eax
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
neg eax
sbb eax, eax
neg eax
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x4c5712
movzx ebx, bx
or ebx, 0x80070000
cmp dword [ebp + 0xc], 0
je 0x4c571a
xor ebx, ebx
test esi, esi
je 0x4c5725
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x4c5730
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea ecx, [ebp - 0x1c]
call fcn.004bb540
mov eax, ebx
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 0x80070216
call fcn.0044a700
push 0x8007000e
call fcn.0044a700
push 0x80070057
call fcn.0044a700
int3
Function at 0x4c5770
Capabilities:
Check for time delay via gettickcount
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5ba11c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x20]
push ebx
push esi
push edi
xorps xmm0, xmm0
mov dword [ebp - 0x24], eax
push ecx
push eax
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 8], 0
movq qword [ebp - 0x10], xmm0
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
neg eax
sbb esi, esi
neg esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4c57bf
movzx eax, ax
or eax, 0x80070000
test esi, esi
je 0x4c5885
mov ebx, dword [ebp + 0xc]
cmp dword [ebp - 0x1c], ebx
je 0x4c586d
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov edi, eax
mov dword [ebp - 0x28], edi
call esi
mov ecx, dword [ebp + 0x10]
sub eax, edi
cmp eax, ecx
jae 0x4c5858
mov eax, 0xcccccccd
mul ecx
mov edi, edx
shr edi, 3
cmp edi, 0x3e8
jae 0x4c5806
mov eax, 0x3e8
jmp 0x4c5815
mov eax, edi
cmp edi, 0x2710
jbe 0x4c5815
mov eax, 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
neg eax
sbb esi, esi
neg esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4c5841
movzx eax, ax
or eax, 0x80070000
test esi, esi
je 0x4c589b
cmp dword [ebp - 0x1c], ebx
je 0x4c586d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x10]
jb 0x4c57f7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004eabba
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004eabba
mov esp, ebp
pop ebp
ret 0xc
push eax
lea ecx, [ebp - 0x24]
call fcn.0044a6e0
push 0x5b6dcc
mov eax, ecx
push eax
call fcn.004edba4
push eax
lea ecx, [ebp - 0x28]
call fcn.0044a6e0
push 0x5b6dcc
mov eax, ecx
push eax
call fcn.004edba4
int3
Function at 0x4c62d0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x5ba11c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x5c], eax
mov edi, ecx
lea eax, [ebp - 0x38]
mov dword [ebp - 0x50], edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4c631f
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004eabba
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x38]
mov esi, ebx
and esi, 1
mov eax, ebx
mov ecx, esi
or ecx, 2
and al, 2
mov eax, ebx
cmove ecx, esi
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov ecx, ebx
mov eax, edx
or eax, 0x10
and ecx, 0x10
cmove eax, edx
mov edx, eax
or edx, 0x20
and bl, 0x20
mov ebx, 0x81000000
cmove edx, eax
test ecx, ecx
mov eax, 0x41000000
cmove eax, ebx
or edx, eax
mov dword [ebp - 0x3c], edx
test esi, esi
jne 0x4c6378
or edx, 0x800000
mov dword [ebp - 0x3c], edx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x28
jbe 0x4c6423
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push edi
call ebx
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 ebx
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, 0x54ad
cmp word [ebp - 0x40], ax
jne 0x4c6423
mov ecx, dword [ebp - 0x48]
lea eax, [ecx + 0x34]
cmp esi, eax
jbe 0x4c6423
push 0
push 0
push ecx
push edi
call ebx
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x4c]
cmp eax, 0x5a4d
je 0x4c6419
cmp eax, 0x454e
je 0x4c6419
cmp eax, 0x454c
je 0x4c6419
cmp eax, 0x4550
jne 0x4c6423
mov eax, dword [ebp - 0x3c]
or eax, 0x400000
jmp 0x4c6426
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x4c642f
mov dword [ecx], eax
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x4c6438
mov dword [eax], esi
mov ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x4c646d
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.004c6230
push esi
push edi
mov dword [ebx], eax
call fcn.004c6230
push dword [ebp - 0x30]
mov dword [ebx + 4], eax
push dword [ebp - 0x34]
call fcn.004c6230
add esp, 0x18
mov dword [ebx + 8], eax
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x4c6493
push esi
push edi
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x40]
call fcn.004c61b0
movzx ecx, word [ebp - 0x40]
add esp, 8
movzx eax, word [ebp - 0x3c]
shl ecx, 0x10
or ecx, eax
mov dword [ebx], ecx
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004eabba
mov esp, ebp
pop ebp
ret
Function at 0x4c8000
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
xor edi, edi
mov eax, dword [esi + 0x6af90]
mov dword [esi + 0x6af80], 2
test eax, eax
je 0x4c8229
cmp eax, 3
jb 0x4c8076
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 0x4c80b3
mov eax, dword [esi + 0x6af84]
sub eax, ebx
cmp eax, 0x7efa
ja 0x4c80b3
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x4c809d
mov dword [esi + 0x6afa0], eax
mov edx, ebx
mov ecx, esi
call fcn.004c7ca0
mov ecx, dword [esi + 0x6af90]
mov edi, eax
cmp edi, ecx
cmova edi, ecx
mov ecx, dword [esi + 0x6af84]
cmp edi, 3
jb 0x4c81ac
sub ecx, dword [esi + 0x6af88]
lea eax, [edi - 3]
mov edx, ecx
mov ecx, esi
push eax
call fcn.004c73f0
mov ecx, dword [esi + 0x6af90]
add esp, 4
sub ecx, edi
mov dword [ebp - 4], eax
mov dword [esi + 0x6af90], ecx
cmp edi, dword [esi + 0x6af98]
ja 0x4c8162
cmp ecx, 3
jb 0x4c8162
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 0x4c8100
inc dword [esi + 0x6af84]
mov eax, dword [ebp - 4]
jmp 0x4c81cd
add dword [esi + 0x6af84], edi
mov dl, 1
mov eax, dword [esi + 0x6af84]
xor edi, edi
push str.Call_UPDATE_HASH___MIN_MATCH_3_more_times
movzx ecx, byte [esi + eax + 0x1af70]
mov dword [esi + 0x6af7c], ecx
movzx eax, byte [eax + esi + 0x1af71]
shl ecx, 5
xor eax, ecx
mov ecx, esi
and eax, 0x7fff
mov dword [esi + 0x6af7c], eax
call fcn.004c64b0
mov eax, dword [ebp - 4]
add esp, 4
jmp 0x4c81cd
movzx eax, byte [esi + ecx + 0x1af70]
xor edx, edx
push eax
mov ecx, esi
call fcn.004c73f0
dec dword [esi + 0x6af90]
add esp, 4
inc dword [esi + 0x6af84]
lea edx, [esi + 0x1af70]
test eax, eax
je 0x4c8207
mov ecx, dword [esi + 0x6af74]
add edx, ecx
mov eax, dword [esi + 0x6af84]
sub eax, ecx
push 0
push eax
xor eax, eax
test ecx, ecx
mov ecx, esi
cmovs edx, eax
call fcn.004c7240
mov eax, dword [esi + 0x6af84]
add esp, 8
mov dword [esi + 0x6af74], eax
mov eax, dword [esi + 0x6af90]
cmp eax, 0x106
jae 0x4c8221
mov ecx, esi
call fcn.004c7ea0
mov eax, dword [esi + 0x6af90]
test eax, eax
jne 0x4c8025
mov eax, dword [esi + 0x6af74]
mov ecx, dword [esi + 0x6af84]
sub ecx, eax
test eax, eax
js 0x4c8257
push 1
lea edx, [esi + 0x1af70]
push ecx
add edx, eax
mov ecx, esi
call fcn.004c7240
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push ecx
xor edx, edx
mov ecx, esi
call fcn.004c7240
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c8f60
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x4c8f6b
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x4c9027
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
sub edi, 1
jne 0x4c8f80
pop edi
test esi, esi
je 0x4c904a
nop dword [eax + eax]
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
sub esi, 1
jne 0x4c9030
not ecx
mov eax, ecx
pop esi
pop ebp
ret

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

Disassembly:
push esi
push edi
mov edi, ecx
movsx eax, dl
mov esi, dword [edi]
xor eax, esi
mov ecx, dword [edi + 8]
movzx eax, al
shr esi, 8
mov eax, dword [eax*4 + 0x583940]
xor eax, esi
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edi + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x583940]
mov dword [edi + 8], ecx
pop edi
pop esi
ret
Function at 0x4c92c0
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 0x4c933f
mov ecx, dword [esi + 0x3c]
mov eax, ecx
test ecx, ecx
je 0x4c92f4
cmp dword [esi + 0x40], edi
jae 0x4c92f4
push ecx
call fcn.004eabcb
add esp, 4
mov dword [esi + 0x3c], 0
xor eax, eax
test eax, eax
jne 0x4c930a
lea eax, [edi + edi]
push eax
call fcn.004eb6f9
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push ebx
mov edx, edi
mov ecx, eax
call fcn.0044a560
add esp, 8
xor ebx, ebx
test edi, edi
je 0x4c933c
lea ecx, [esi + 0x30]
mov eax, dword [esi + 0x3c]
mov dl, byte [ebx + eax]
call fcn.004c90d0
mov cl, al
mov eax, dword [esi + 0x3c]
mov byte [ebx + eax], cl
inc ebx
lea ecx, [esi + 0x30]
cmp ebx, edi
jb 0x4c9321
mov ebx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4c937b
mov edx, dword [esi + 0x24]
lea eax, [edx + edi]
cmp eax, dword [esi + 0x28]
jb 0x4c9361
pop edi
mov dword [esi + 0x14], 0x30000
xor eax, eax
pop esi
pop ebx
pop ebp
ret 8
push edi
add ecx, edx
mov edx, edi
push ebx
call fcn.0044a560
add esp, 8
mov eax, edi
add dword [esi + 0x24], edi
pop edi
pop esi
pop ebx
pop ebp
ret 8
mov eax, dword [esi + 4]
test eax, eax
je 0x4c939b
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]
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 0x4c9660
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 + 0x78]
test edx, edx
je 0x4c96bf
mov ecx, dword [edi + 0x80]
mov ebx, dword [edi + 0x7c]
cmp ecx, ebx
jae 0x4c9707
sub ebx, ecx
lea eax, [ecx + edx]
cmp ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmova ebx, dword [ebp + 0xc]
push ebx
push eax
mov edx, ebx
call fcn.0044a560
mov edx, dword [ebp + 8]
mov ecx, dword [edi + 0x6c]
add dword [edi + 0x80], ebx
add dword [edi + 0x68], ebx
push ebx
call fcn.004c8f60
add esp, 0xc
mov dword [edi + 0x6c], eax
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi + 0x70]
test eax, eax
je 0x4c9700
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 0x4c9707
mov esi, dword [ebp - 4]
mov edx, ebx
mov ecx, dword [edi + 0x6c]
add dword [edi + 0x68], esi
push esi
call fcn.004c8f60
add esp, 4
mov dword [edi + 0x6c], 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 0x4cb4f0
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file
Set file attributes

Disassembly:
push ebx
push esi
mov esi, ecx
mov bh, dl
push dword [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne bl
test eax, eax
je 0x4cb51f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x4cb51f
and eax, 0xfffffffe
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test bh, bh
je 0x4cb541
test bl, bl
je 0x4cb53c
push 4
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4cb53c
pop esi
mov al, 1
pop ebx
ret
pop esi
xor al, al
pop ebx
ret
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
pop esi
setne al
pop ebx
ret