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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6bc358
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x7adbc4]
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.004ce2e0
mov ebx, dword [ebp - 0x18]
mov esi, eax
test esi, esi
jns 0x50818e
call fcn.00516890
mov edi, eax
mov ecx, edi
call fcn.00516630
cmp byte [0x7b8b25], 0
jne 0x508141
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x508136
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8b25
sub esp, 0xc
push 0x4c
push str.C:GitLab_Runner_buildsTzUW5DUw0windowswindows_agentCommonDebugHelper.cpp
push 8
call fcn.00516700
jmp 0x508138
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x7bbc98], eax
mov ecx, edi
call fcn.00516640
mov ecx, dword [0x7bbc98]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bbc98]
push esi
push str.Create_dump_file_failed___u_
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov ecx, dword [0x7bbc98]
add esp, 0xc
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bbc98]
lea ecx, [ecx + 0xd0]
call fcn.00516640
jmp 0x5082ad
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [edi]
push 0x7baa98
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
call fcn.00652648
add esp, 4
test eax, eax
je 0x5081ba
push eax
call fcn.006522e8
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 0x7baa98
mov byte [ebp - 4], 2
call fcn.0065266d
add esp, 4
test eax, eax
je 0x5081f1
push eax
call fcn.006522e8
add esp, 4
mov byte [ebp - 4], 0
test esi, esi
jne 0x5082ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00516890
mov edi, eax
mov ecx, edi
call fcn.00516630
cmp byte [0x7b8b26], 0
jne 0x508261
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x508256
sub esp, 8
xorps xmm0, xmm0
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8b26
sub esp, 0xc
push 0x60
push str.C:GitLab_Runner_buildsTzUW5DUw0windowswindows_agentCommonDebugHelper.cpp
push 8
call fcn.00516700
jmp 0x508258
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x7bbc9c], eax
mov ecx, edi
call fcn.00516640
mov ecx, dword [0x7bbc9c]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bbc9c]
push esi
push str.Write_dump_failed___u_
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov ecx, dword [0x7bbc9c]
add esp, 0xc
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bbc9c]
lea ecx, [ecx + 0xd0]
call fcn.00516640
jmp 0x5082ad
xor esi, esi
test ebx, ebx
je 0x5082b8
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 0x509ff0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6bc609
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push esi
push edi
mov eax, dword [0x7adbc4]
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.00493480
mov ecx, eax
test ecx, ecx
je 0x50a145
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 0x50a0ad
nop dword [eax]
cmp dword [esi + 4], 2
je 0x50a0c7
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x50a0a0
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 0x50a0eb
push 0x30
mov ecx, edi
call fcn.00499950
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 0x50a10f
xor ecx, ecx
jmp 0x50a121
push dword [eax - 8]
push eax
call fcn.00675480
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x50a13b
mov eax, dword [edi]
cmp ecx, dword [eax - 8]
jg 0x50a13b
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x10]
jmp 0x50a0ad
push 0x80070057
call fcn.00490960
push 0x80004005
call fcn.00490960
int3
Function at 0x50b6a0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6be440
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x7adbc4]
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.00507a60
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 0x50b70c
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x50b7bd
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 0x50b745
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x50b7d3
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 0x50b76c
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x50b7e9
jmp 0x50b78d
test esi, esi
je 0x50b79c
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x50b7a2
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x50b7a9
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.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
push eax
lea ecx, [ebp - 0x18]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
push eax
lea ecx, [ebp - 0x1c]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
int3
Function at 0x50b800
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6be468
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x7adbc4]
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.00499fa0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
mov eax, ecx
not eax
cmp eax, 1
jb 0x50b9bc
lea eax, [ecx + 1]
push ecx
push eax
lea ecx, [ebp - 0x1c]
call fcn.00501a30
test al, al
je 0x50b9c6
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x50b9d0
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 0x50b8db
nop dword [eax]
mov eax, dword [edi]
mov esi, ecx
cmp esi, dword [ebp - 0x14]
jb 0x50b8c5
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00502560
test al, al
je 0x50b9c6
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 0x50b8a0
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.00507a60
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 0x50b91b
movzx ebx, bx
or ebx, 0x80070000
cmp dword [ebp + 0xc], 0
je 0x50b995
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 0x50b951
movzx ebx, bx
or ebx, 0x80070000
cmp dword [ebp + 0xc], 0
je 0x50b98a
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 0x50b982
movzx ebx, bx
or ebx, 0x80070000
cmp dword [ebp + 0xc], 0
je 0x50b98a
xor ebx, ebx
test esi, esi
je 0x50b995
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x50b9a0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea ecx, [ebp - 0x1c]
call fcn.00501770
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.00490960
push 0x8007000e
call fcn.00490960
push 0x80070057
call fcn.00490960
int3
Function at 0x50b9e0
Capabilities:
Check for time delay via gettickcount
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x7adbc4]
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 0x50ba2f
movzx eax, ax
or eax, 0x80070000
test esi, esi
je 0x50baf5
mov ebx, dword [ebp + 0xc]
cmp dword [ebp - 0x1c], ebx
je 0x50badd
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 0x50bac8
mov eax, 0xcccccccd
mul ecx
mov edi, edx
shr edi, 3
cmp edi, 0x3e8
jae 0x50ba76
mov eax, 0x3e8
jmp 0x50ba85
mov eax, edi
cmp edi, 0x2710
jbe 0x50ba85
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 0x50bab1
movzx eax, ax
or eax, 0x80070000
test esi, esi
je 0x50bb0b
cmp dword [ebp - 0x1c], ebx
je 0x50badd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x10]
jb 0x50ba67
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00669a8a
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.00669a8a
mov esp, ebp
pop ebp
ret 0xc
push eax
lea ecx, [ebp - 0x24]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
push eax
lea ecx, [ebp - 0x28]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
int3
Function at 0x50c540
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x7adbc4]
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 0x50c58f
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00669a8a
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 0x50c5e8
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 0x50c693
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 0x50c693
mov ecx, dword [ebp - 0x48]
lea eax, [ecx + 0x34]
cmp esi, eax
jbe 0x50c693
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 0x50c689
cmp eax, 0x454e
je 0x50c689
cmp eax, 0x454c
je 0x50c689
cmp eax, 0x4550
jne 0x50c693
mov eax, dword [ebp - 0x3c]
or eax, 0x400000
jmp 0x50c696
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x50c69f
mov dword [ecx], eax
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x50c6a8
mov dword [eax], esi
mov ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x50c6dd
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.0050c4a0
push esi
push edi
mov dword [ebx], eax
call fcn.0050c4a0
push dword [ebp - 0x30]
mov dword [ebx + 4], eax
push dword [ebp - 0x34]
call fcn.0050c4a0
add esp, 0x18
mov dword [ebx + 8], eax
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x50c703
push esi
push edi
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x40]
call fcn.0050c420
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.00669a8a
mov esp, ebp
pop ebp
ret
Function at 0x50e270
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 0x50e499
cmp eax, 3
jb 0x50e2e6
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 0x50e323
mov eax, dword [esi + 0x6af84]
sub eax, ebx
cmp eax, 0x7efa
ja 0x50e323
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x50e30d
mov dword [esi + 0x6afa0], eax
mov edx, ebx
mov ecx, esi
call fcn.0050df10
mov ecx, dword [esi + 0x6af90]
mov edi, eax
cmp edi, ecx
cmova edi, ecx
mov ecx, dword [esi + 0x6af84]
cmp edi, 3
jb 0x50e41c
sub ecx, dword [esi + 0x6af88]
lea eax, [edi - 3]
mov edx, ecx
mov ecx, esi
push eax
call fcn.0050d660
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 0x50e3d2
cmp ecx, 3
jb 0x50e3d2
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 0x50e370
inc dword [esi + 0x6af84]
mov eax, dword [ebp - 4]
jmp 0x50e43d
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.0050c720
mov eax, dword [ebp - 4]
add esp, 4
jmp 0x50e43d
movzx eax, byte [esi + ecx + 0x1af70]
xor edx, edx
push eax
mov ecx, esi
call fcn.0050d660
dec dword [esi + 0x6af90]
add esp, 4
inc dword [esi + 0x6af84]
lea edx, [esi + 0x1af70]
test eax, eax
je 0x50e477
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.0050d4b0
mov eax, dword [esi + 0x6af84]
add esp, 8
mov dword [esi + 0x6af74], eax
mov eax, dword [esi + 0x6af90]
cmp eax, 0x106
jae 0x50e491
mov ecx, esi
call fcn.0050e110
mov eax, dword [esi + 0x6af90]
test eax, eax
jne 0x50e295
mov eax, dword [esi + 0x6af74]
mov ecx, dword [esi + 0x6af84]
sub ecx, eax
test eax, eax
js 0x50e4c7
push 1
lea edx, [esi + 0x1af70]
push ecx
add edx, eax
mov ecx, esi
call fcn.0050d4b0
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.0050d4b0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x50f1d0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x50f1db
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x50f297
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 + 0x773a30]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x773a30]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x773a30]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x773a30]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x773a30]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x773a30]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x773a30]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x773a30]
sub edi, 1
jne 0x50f1f0
pop edi
test esi, esi
je 0x50f2ba
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 + 0x773a30]
sub esi, 1
jne 0x50f2a0
not ecx
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x50f2d0
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 + 0x773a30]
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 + 0x773a30]
mov dword [edi + 8], ecx
pop edi
pop esi
ret
Function at 0x50f530
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 0x50f5af
mov ecx, dword [esi + 0x3c]
mov eax, ecx
test ecx, ecx
je 0x50f564
cmp dword [esi + 0x40], edi
jae 0x50f564
push ecx
call fcn.00669a9b
add esp, 4
mov dword [esi + 0x3c], 0
xor eax, eax
test eax, eax
jne 0x50f57a
lea eax, [edi + edi]
push eax
call fcn.0066a5c9
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.004907c0
add esp, 8
xor ebx, ebx
test edi, edi
je 0x50f5ac
lea ecx, [esi + 0x30]
mov eax, dword [esi + 0x3c]
mov dl, byte [ebx + eax]
call fcn.0050f340
mov cl, al
mov eax, dword [esi + 0x3c]
mov byte [ebx + eax], cl
inc ebx
lea ecx, [esi + 0x30]
cmp ebx, edi
jb 0x50f591
mov ebx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x50f5eb
mov edx, dword [esi + 0x24]
lea eax, [edx + edi]
cmp eax, dword [esi + 0x28]
jb 0x50f5d1
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.004907c0
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 0x50f60b
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 0x50f8d0
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 0x50f92f
mov ecx, dword [edi + 0x80]
mov ebx, dword [edi + 0x7c]
cmp ecx, ebx
jae 0x50f977
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.004907c0
mov edx, dword [ebp + 8]
mov ecx, dword [edi + 0x6c]
add dword [edi + 0x80], ebx
add dword [edi + 0x68], ebx
push ebx
call fcn.0050f1d0
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 0x50f970
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 0x50f977
mov esi, dword [ebp - 4]
mov edx, ebx
mov ecx, dword [edi + 0x6c]
add dword [edi + 0x68], esi
push esi
call fcn.0050f1d0
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 0x511760
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 0x51178f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x51178f
and eax, 0xfffffffe
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test bh, bh
je 0x5117b1
test bl, bl
je 0x5117ac
push 4
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x5117ac
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