joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10034d5e
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x10034d6c
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x10], 8
push esi
push edi
not eax
mov ecx, 0xff
jb 0x10034e4d
mov edi, dword [ebp + 0x10]
push ebx
shr edi, 3
movzx ebx, byte [edx]
mov esi, eax
sub dword [ebp + 0x10], 8
and esi, ecx
xor esi, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [esi*4 + 0x1004f4f4]
xor eax, ebx
inc edx
mov esi, eax
movzx ebx, byte [edx]
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x1004f4f4]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x1004f4f4]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x1004f4f4]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x1004f4f4]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x1004f4f4]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x1004f4f4]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
shr eax, 8
mov esi, dword [esi*4 + 0x1004f4f4]
xor eax, esi
inc edx
dec edi
jne 0x10034d89
pop ebx
cmp dword [ebp + 0x10], 0
je 0x10034e6e
movzx edi, byte [edx]
mov esi, eax
and esi, ecx
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x1004f4f4]
xor eax, esi
inc edx
dec dword [ebp + 0x10]
jne 0x10034e53
pop edi
pop esi
not eax
pop ebp
ret

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

Disassembly:
mov ecx, dword [esp + 4]
push esi
push edi
mov edx, 0xff
mov esi, dword [ecx]
movzx edi, byte [esp + 0x10]
mov eax, esi
and eax, edx
xor eax, edi
shr esi, 8
mov eax, dword [eax*4 + 0x1004f4f4]
xor eax, esi
mov esi, dword [ecx + 8]
mov dword [ecx], eax
and eax, edx
add eax, dword [ecx + 4]
mov edi, esi
and edi, edx
imul eax, eax, 0x8088405
inc eax
mov dword [ecx + 4], eax
shr eax, 0x18
xor eax, edi
pop edi
shr esi, 8
mov eax, dword [eax*4 + 0x1004f4f4]
xor eax, esi
pop esi
mov dword [ecx + 8], eax
ret
Function at 0x1003573f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x10035773
lea eax, [ebp + 8]
push 0
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1003576e
mov byte [esi + 8], 1
mov eax, dword [ebp + 8]
jmp 0x100357ab
mov ecx, edi
xor eax, eax
add ecx, dword [esi + 0x28]
adc eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x24]
jl 0x1003578f
jg 0x10035789
cmp ecx, dword [esi + 0x20]
jbe 0x1003578f
mov edi, dword [esi + 0x20]
sub edi, dword [esi + 0x28]
mov eax, dword [esi + 0x1c]
push edi
add eax, dword [esi + 0x28]
push eax
push dword [ebp + 8]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [esi + 0x28], edi
mov eax, edi
adc dword [esi + 0x2c], 0
xor edx, edx
pop edi
div dword [ebp + 0xc]
pop esi
pop ebp
ret
Function at 0x10035909
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
push edi
cmp esi, ebx
push 2
push ebx
je 0x10035972
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov edi, dword [ebp + 8]
neg eax
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp + 0xc]
push ebx
push eax
mov eax, dword [esi]
mov ecx, esi
mov dword [ebp + 0xc], ebx
call dword [eax + 8]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100359b3
mov eax, dword [esi]
push ebx
mov ecx, esi
call dword [eax + 0xc]
push edx
push eax
push edi
call fcn.10035670
add esp, 0x10
test eax, eax
je 0x10035985
jmp 0x100359b3
push ebx
push dword [ebp + 8]
call fcn.10035670
add esp, 0x10
test eax, eax
jne 0x100359b3
mov edi, dword [ebp + 8]
push edi
call fcn.1003563f
pop ecx
mov ecx, eax
mov eax, 0xffff
cmp ecx, eax
mov dword [ebp - 0xc], ecx
mov dword [ebp + 0xc], eax
jae 0x100359a0
mov dword [ebp + 0xc], ecx
mov edi, 0x404
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x100359bb
or eax, 0xffffffff
jmp 0x10035a67
or dword [ebp - 8], 0xffffffff
push 4
pop eax
cmp dword [ebp + 0xc], eax
jbe 0x10035a5c
jmp 0x100359d5
mov eax, dword [ebp - 4]
mov edi, 0x404
mov ecx, dword [ebp + 0xc]
add eax, 0x400
cmp eax, ecx
mov dword [ebp - 4], ecx
ja 0x100359e7
mov dword [ebp - 4], eax
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
sub esi, dword [ebp - 4]
sub eax, esi
cmp eax, edi
ja 0x100359f8
mov edi, eax
push 0
push 0
push esi
push dword [ebp + 8]
call fcn.10035670
add esp, 0x10
test eax, eax
jne 0x10035a5c
push dword [ebp + 8]
push 1
push edi
push ebx
call fcn.1003573f
add esp, 0x10
cmp eax, 1
jne 0x10035a5c
lea eax, [edi - 3]
mov ecx, eax
dec eax
test ecx, ecx
jle 0x10035a4a
cmp byte [eax + ebx], 0x50
jne 0x10035a23
cmp byte [eax + ebx + 1], 0x4b
jne 0x10035a23
cmp byte [eax + ebx + 2], 5
jne 0x10035a23
cmp byte [eax + ebx + 3], 6
jne 0x10035a23
add eax, esi
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x10035a5c
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 4], eax
jb 0x100359cd
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [ebp - 8]
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1003680e
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x100368d1
cmp dword [esi + 4], 0xffffffff
jne 0x100368d1
push ebx
push edi
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push edi
call ebx
mov ax, word [esi + eax*2 + 0x242]
pop ecx
cmp ax, 0x5c
je 0x10036874
cmp ax, 0x2f
je 0x10036874
push edi
call ebx
mov ecx, 0x103
sub ecx, eax
push ecx
push 0x1005cd28
push edi
call dword [sym.imp.MSVCRT.dll_wcsncat]
add esp, 0x10
cmp dword [ebp + 0x10], 1
pop edi
pop ebx
jne 0x10036897
push 1
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10036897
mov eax, 0x2000000
jmp 0x100368d6
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.10035504
add esp, 0x10
test eax, eax
jne 0x100368b5
mov eax, dword [ebp - 4]
jmp 0x100368d6
push dword [ebp + 0x14]
push eax
call fcn.10035a6c
mov dword [esi], eax
pop ecx
neg eax
sbb eax, eax
pop ecx
and ax, 0xfe00
add eax, 0x200
jmp 0x100368d6
mov eax, 0x1000000
pop esi
leave
ret 0x10

Function at 0x10036e2e
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
push edi
je 0x10036e55
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10036e55
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [ebp + 0xc]
mov cx, word [edi]
test cx, cx
je 0x10036f1a
mov eax, edi
mov edx, edi
cmp cx, 0x2f
je 0x10036e74
cmp cx, 0x5c
jne 0x10036e76
mov eax, edx
inc edx
inc edx
mov cx, word [edx]
test cx, cx
jne 0x10036e68
cmp eax, edi
push esi
je 0x10036eb4
sub eax, edi
sar eax, 1
shl eax, 1
mov esi, eax
lea eax, [ebp - 0x410]
push esi
push edi
push eax
call sub.MSVCRT.dll_memcpy
and word [ebp + esi - 0x410], 0
lea eax, [ebp - 0x410]
push eax
push ebx
call fcn.10036e2e
add esp, 0x14
and word [ebp - 0x208], 0
mov esi, 0x103
test ebx, ebx
je 0x10036ed7
push esi
lea eax, [ebp - 0x208]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
sub esi, eax
lea eax, [ebp - 0x208]
push esi
push edi
push eax
call dword [sym.imp.MSVCRT.dll_wcsncat]
add esp, 0x10
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
pop esi
jne 0x10036f1a
lea eax, [ebp - 0x208]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
pop edi
pop ebx
leave
ret
Function at 0x10037fd0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x10037ff3
mov eax, 0x200
jmp 0x1003815f
mov ecx, dword [ebp - 0x4c]
push ebx
push esi
push 1
mov edx, ecx
pop eax
xor ebx, ebx
and edx, eax
mov dword [ebp - 8], ebx
je 0x10038009
mov dword [ebp - 8], eax
test cl, 2
je 0x10038012
or dword [ebp - 8], 2
test cl, 4
je 0x1003801b
or dword [ebp - 8], 4
mov eax, ecx
and eax, 0x10
je 0x10038026
or dword [ebp - 8], 0x10
test cl, 0x20
je 0x1003802f
or dword [ebp - 8], 0x20
cmp eax, ebx
je 0x10038039
or byte [ebp - 5], 0x40
jmp 0x1003803d
or byte [ebp - 5], 0x80
or byte [ebp - 5], 1
cmp edx, ebx
jne 0x10038049
or byte [ebp - 6], 0x80
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x28
mov dword [ebp - 0x10], eax
jbe 0x100380e4
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push edi
call esi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 2]
push 2
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
push ebx
push ebx
push 0x24
push dword [ebp + 8]
call esi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x14]
push 4
push eax
push dword [ebp + 8]
call edi
cmp word [ebp - 2], 0x54ad
jne 0x100380e4
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x34]
cmp dword [ebp - 0x10], ecx
jbe 0x100380e4
push ebx
push ebx
push eax
push dword [ebp + 8]
call esi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x18]
push 4
push eax
push dword [ebp + 8]
call edi
mov eax, dword [ebp - 0x18]
cmp eax, 0x5a4d
je 0x100380e0
cmp eax, 0x454e
je 0x100380e0
cmp eax, 0x454c
je 0x100380e0
cmp eax, 0x4550
jne 0x100380e4
or byte [ebp - 6], 0x40
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x100380f0
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x100380fc
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov esi, dword [ebp + 0x14]
cmp esi, ebx
je 0x1003812f
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
call fcn.10037f59
push dword [ebp - 0x34]
mov dword [esi], eax
push dword [ebp - 0x38]
call fcn.10037f59
push dword [ebp - 0x44]
mov dword [esi + 4], eax
push dword [ebp - 0x48]
call fcn.10037f59
add esp, 0x18
mov dword [esi + 8], eax
mov esi, dword [ebp + 0x18]
cmp esi, ebx
je 0x1003815b
lea eax, [ebp + 0xe]
push eax
lea eax, [ebp + 0xa]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call fcn.10037efa
movzx eax, word [ebp + 0xa]
movzx ecx, word [ebp + 0xe]
shl eax, 0x10
add esp, 0x10
or eax, ecx
mov dword [esi], eax
pop esi
xor eax, eax
pop ebx
pop edi
leave
ret
Function at 0x100395df
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
push 1
xor edi, edi
pop eax
cmp ebx, eax
jl 0x100395f4
cmp ebx, 8
jle 0x100395f6
xor eax, eax
mov esi, dword [esp + 0x10]
push str.bad_pack_level
push eax
push esi
call fcn.10038162
lea ecx, [esi + 0x6af70]
lea eax, [esi + 0x6af78]
add esp, 0xc
cmp dword [ecx], edi
mov dword [eax], edi
jne 0x10039627
mov dword [eax], 1
mov dword [ecx], 0x10000
push 0x1fffc
lea eax, [esi + 0x4af70]
push edi
push eax
mov dword [esi + 0x6af6c], edi
call sub.MSVCRT.dll_memset
mov eax, ebx
add esp, 0xc
shl eax, 3
cmp ebx, 2
movzx ecx, word [eax + 0x1004faba]
mov dword [esi + 0x6af98], ecx
movzx ecx, word [eax + 0x1004fab8]
mov dword [esi + 0x6af9c], ecx
movzx ecx, word [eax + 0x1004fabc]
mov dword [esi + 0x6afa0], ecx
movzx eax, word [eax + 0x1004fabe]
mov dword [esi + 0x6af94], eax
jg 0x10039689
mov eax, dword [esp + 0x18]
or byte [eax], 4
jmp 0x10039695
cmp ebx, 8
jl 0x10039695
mov eax, dword [esp + 0x18]
or byte [eax], 2
lea ebx, [esi + 0x1af70]
push 0x10000
push ebx
push esi
mov dword [esi + 0x6af84], edi
mov dword [esi + 0x6af74], edi
call dword [esi + 0xc]
add esp, 0xc
cmp eax, edi
mov dword [esi + 0x6af90], eax
je 0x10039705
cmp eax, 0xffffffff
je 0x10039705
cmp eax, 0x106
mov dword [esi + 0x6af8c], edi
jae 0x100396d7
push esi
call fcn.100398dc
pop ecx
mov dword [esi + 0x6af7c], edi
movzx eax, byte [ebx + edi]
mov ecx, dword [esi + 0x6af7c]
and eax, 0x7fff
and ecx, 0x3ff
shl ecx, 5
xor eax, ecx
inc edi
cmp edi, 2
mov dword [esi + 0x6af7c], eax
jb 0x100396dd
jmp 0x10039715
mov dword [esi + 0x6af8c], 1
mov dword [esi + 0x6af90], edi
pop edi
pop esi
pop ebx
ret
Function at 0x10039a07
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
push edi
xor ebp, ebp
xor edi, edi
mov eax, dword [esi + 0x6af90]
mov dword [esi + 0x6af80], 2
test eax, eax
je 0x10039c21
push ebx
mov ebx, 0x7fff
cmp eax, 3
jb 0x10039a7f
mov ecx, dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af7c]
and edx, 0x3ff
movzx eax, byte [ecx + esi + 0x1af72]
and eax, ebx
shl edx, 5
xor eax, edx
and ecx, ebx
mov dword [esi + 0x6af7c], eax
mov ebp, dword [esi + eax*4 + 0x4af70]
mov dword [esi + ecx*4 + 0x2af70], ebp
mov eax, dword [esi + 0x6af7c]
mov ecx, dword [esi + 0x6af84]
mov dword [esi + eax*4 + 0x4af70], ecx
test ebp, ebp
je 0x10039abb
mov eax, dword [esi + 0x6af84]
sub eax, ebp
cmp eax, 0x7efa
ja 0x10039abb
mov ecx, dword [esi + 0x6af90]
lea eax, [esi + 0x6afa0]
cmp dword [eax], ecx
jbe 0x10039aa4
mov dword [eax], ecx
push ebp
push esi
call fcn.10039719
mov edi, eax
mov eax, dword [esi + 0x6af90]
pop ecx
cmp edi, eax
pop ecx
jbe 0x10039abb
mov edi, eax
cmp edi, 3
jb 0x10039b98
lea eax, [edi - 3]
push eax
mov eax, dword [esi + 0x6af84]
sub eax, dword [esi + 0x6af88]
push eax
push esi
call fcn.10038f51
sub dword [esi + 0x6af90], edi
add esp, 0xc
cmp edi, dword [esi + 0x6af98]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x6af90]
ja 0x10039b51
cmp eax, 3
jb 0x10039b51
dec edi
inc dword [esi + 0x6af84]
mov ecx, dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af7c]
movzx eax, byte [esi + ecx + 0x1af72]
and edx, 0x3ff
and eax, ebx
shl edx, 5
xor eax, edx
and ecx, ebx
mov dword [esi + 0x6af7c], eax
dec edi
mov ebp, dword [esi + eax*4 + 0x4af70]
mov dword [esi + ecx*4 + 0x2af70], ebp
mov eax, dword [esi + 0x6af7c]
mov ecx, dword [esi + 0x6af84]
mov dword [esi + eax*4 + 0x4af70], ecx
jne 0x10039afc
jmp 0x10039bbc
add dword [esi + 0x6af84], edi
mov eax, dword [esi + 0x6af84]
lea edx, [esi + 0x6af7c]
push str.Call_UPDATE_HASH___MIN_MATCH_3_more_times
lea ecx, [eax + esi]
push 1
push esi
xor edi, edi
movzx eax, byte [ecx + 0x1af70]
mov dword [edx], eax
and eax, 0x3ff
movzx ecx, byte [ecx + 0x1af71]
and ecx, ebx
shl eax, 5
xor ecx, eax
mov dword [edx], ecx
call fcn.10038162
add esp, 0xc
jmp 0x10039bc2
mov eax, dword [esi + 0x6af84]
movzx eax, byte [eax + esi + 0x1af70]
push eax
push 0
push esi
call fcn.10038f51
add esp, 0xc
dec dword [esi + 0x6af90]
mov dword [esp + 0x14], eax
inc dword [esi + 0x6af84]
cmp dword [esp + 0x14], 0
je 0x10039bff
mov eax, dword [esi + 0x6af74]
test eax, eax
jl 0x10039bdc
lea ecx, [eax + esi + 0x1af70]
jmp 0x10039bde
xor ecx, ecx
mov edx, dword [esi + 0x6af84]
push 0
sub edx, eax
push edx
push ecx
push esi
call fcn.10038d41
mov eax, dword [esi + 0x6af84]
add esp, 0x10
mov dword [esi + 0x6af74], eax
cmp dword [esi + 0x6af90], 0x106
jae 0x10039c12
push esi
call fcn.100398dc
pop ecx
mov eax, dword [esi + 0x6af90]
test eax, eax
jne 0x10039a30
pop ebx
mov eax, dword [esi + 0x6af74]
test eax, eax
jl 0x10039c34
lea ecx, [eax + esi + 0x1af70]
jmp 0x10039c36
xor ecx, ecx
mov edx, dword [esi + 0x6af84]
push 1
sub edx, eax
push edx
push ecx
push esi
call fcn.10038d41
add esp, 0x10
pop edi
pop esi
pop ebp
ret
Function at 0x1003a779
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x1003a787
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x10], 8
push esi
push edi
not eax
mov ecx, 0xff
jb 0x1003a868
mov edi, dword [ebp + 0x10]
push ebx
shr edi, 3
movzx ebx, byte [edx]
mov esi, eax
sub dword [ebp + 0x10], 8
and esi, ecx
xor esi, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [esi*4 + 0x1004fb08]
xor eax, ebx
inc edx
mov esi, eax
movzx ebx, byte [edx]
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x1004fb08]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x1004fb08]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x1004fb08]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x1004fb08]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x1004fb08]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x1004fb08]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
shr eax, 8
mov esi, dword [esi*4 + 0x1004fb08]
xor eax, esi
inc edx
dec edi
jne 0x1003a7a4
pop ebx
cmp dword [ebp + 0x10], 0
je 0x1003a889
movzx edi, byte [edx]
mov esi, eax
and esi, ecx
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x1004fb08]
xor eax, esi
inc edx
dec dword [ebp + 0x10]
jne 0x1003a86e
pop edi
pop esi
not eax
pop ebp
ret

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

Disassembly:
mov ecx, dword [esp + 4]
push esi
push edi
mov edx, 0xff
mov esi, dword [ecx]
movzx edi, byte [esp + 0x10]
mov eax, esi
and eax, edx
xor eax, edi
shr esi, 8
mov eax, dword [eax*4 + 0x1004fb08]
xor eax, esi
mov esi, dword [ecx + 8]
mov dword [ecx], eax
and eax, edx
add eax, dword [ecx + 4]
mov edi, esi
and edi, edx
imul eax, eax, 0x8088405
inc eax
mov dword [ecx + 4], eax
shr eax, 0x18
xor eax, edi
pop edi
shr esi, 8
mov eax, dword [eax*4 + 0x1004fb08]
xor eax, esi
pop esi
mov dword [ecx + 8], eax
ret
Function at 0x1003ab9d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp byte [esi + 0x2d], 0
je 0x1003ac11
mov eax, dword [esi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x1003abc9
cmp dword [esi + 0x40], edi
jae 0x1003abc9
push eax
call sub.MFC42u.DLL_operatordelete
pop ecx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x3c], ebx
jne 0x1003abde
lea eax, [edi + edi]
push eax
call sub.MFC42u.DLL_operatornew
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x3c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
test edi, edi
jbe 0x1003ac0e
mov eax, dword [esi + 0x3c]
mov al, byte [ebx + eax]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.1003a8fd
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x1003abf1
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x1003ac40
mov eax, dword [esi + 0x24]
lea ebx, [eax + edi]
cmp ebx, dword [esi + 0x28]
jb 0x1003ac2c
mov dword [esi + 0x14], 0x30000
jmp 0x1003ac62
push edi
add eax, ecx
push edx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
jmp 0x1003ac64
mov eax, dword [esi + 4]
test eax, eax
je 0x1003ac5b
lea ecx, [ebp + 8]
push 0
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x1003ac64
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x1003af99
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0x78]
test ecx, ecx
je 0x1003afe9
mov eax, dword [esi + 0x80]
mov edi, dword [esi + 0x7c]
cmp eax, edi
jae 0x1003b02b
sub edi, eax
cmp edi, dword [ebp + 0xc]
jbe 0x1003afbe
mov edi, dword [ebp + 0xc]
add eax, ecx
push edi
push eax
push dword [ebp + 8]
call sub.MSVCRT.dll_memcpy
add dword [esi + 0x80], edi
add dword [esi + 0x68], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x6c]
call fcn.1003a779
mov dword [esi + 0x6c], eax
add esp, 0x18
mov eax, edi
jmp 0x1003b02d
mov eax, dword [esi + 0x70]
test eax, eax
je 0x1003b024
lea ecx, [ebp + 0xc]
push 0
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003b02b
mov eax, dword [ebp + 0xc]
add dword [esi + 0x68], eax
push eax
push dword [ebp + 8]
push dword [esi + 0x6c]
call fcn.1003a779
mov dword [esi + 0x6c], eax
mov eax, dword [ebp + 0xc]
add esp, 0xc
jmp 0x1003b02d
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebp
ret 8
Function at 0x1003c0dd
Capabilities:
Create thread

Disassembly:
mov eax, 0x1004bb88
call fcn.100464e0
sub esp, 0x10
push esi
push edi
push str.CDownload::Init__
mov esi, ecx
push 3
call fcn.1003fe92
xor edi, edi
pop ecx
cmp dword [esi + 0xc], edi
pop ecx
je 0x1003c10b
push 1
pop eax
jmp 0x1003c19a
cmp dword [esi + 0x58], edi
push ebx
mov dword [esi + 0xcc], 0x5dc
jne 0x1003c155
mov ebx, dword [sym.imp.KERNEL32.dll_CreateEventW]
push edi
push edi
push edi
push edi
call ebx
push edi
push edi
push edi
push edi
mov dword [esi + 0x5c], eax
call ebx
push edi
push edi
push edi
push edi
mov dword [esi + 0x60], eax
call ebx
mov dword [esi + 0x64], eax
lea eax, [esi + 0x68]
push eax
push edi
push esi
push 0x1003d960
push edi
push edi
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 0x58], eax
lea ebx, [esi + 0x9c]
mov dword [ebp - 0x14], 0x1004ff44
mov dword [ebp - 0x10], ebx
lea eax, [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 1
mov dword [ebp - 4], edi
pop edi
lea eax, [ebp - 0x1c]
push eax
lea ecx, [esi + 0x6c]
mov dword [ebp - 0x1c], edi
call fcn.1003df4c
push dword [esi + 0x64]
call dword [sym.imp.KERNEL32.dll_SetEvent]
add ebx, 4
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret

Function at 0x1003c264
Capabilities:
Print debug messages
Terminate thread

Disassembly:
mov eax, 0x1004bbb0
call fcn.100464e0
sub esp, 0x10
push ebx
push esi
push edi
push str.CDownload::Uninit__
mov esi, ecx
push 3
call fcn.1003fe92
lea ebx, [esi + 0x9c]
pop ecx
pop ecx
mov dword [ebp - 0x10], ebx
lea eax, [ebx + 4]
mov dword [ebp - 0x14], 0x1004ff44
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp - 4], 0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [esi + 0x6c]
mov dword [ebp - 0x1c], 2
call fcn.1003df4c
push dword [esi + 0x64]
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
call edi
add ebx, 4
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [esi + 0x5c]
call edi
push dword [esi + 0x64]
call edi
cmp dword [esi + 0x58], 0
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x1003c314
push 0x7530
push dword [esi + 0x60]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1003c30b
push 0x3ff
push dword [esi + 0x58]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push str.Uninit::TerminateThread
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [esi + 0x58]
call edi
and dword [esi + 0x58], 0
push dword [esi + 0x64]
call edi
push dword [esi + 0x5c]
call edi
push dword [esi + 0x60]
call edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret