joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001d040
Capabilities:
Set file attributes

Disassembly:
sub esp, 0x418
mov eax, dword [0x1017455c]
xor eax, esp
mov dword [esp + 0x414], eax
mov eax, dword [esp + 0x420]
push ebx
push ebp
mov ebp, dword [esp + 0x424]
push esi
push edi
xor ebx, ebx
push 0x103
lea ecx, [esp + 0x19]
push ebx
push ecx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x20], bl
call fcn.10116880
push 0x103
lea edx, [esp + 0x22d]
push ebx
push edx
mov byte [esp + 0x234], bl
call fcn.10116880
push 0x103
lea eax, [esp + 0x135]
push ebx
push eax
mov byte [esp + 0x13c], bl
call fcn.10116880
push 0x103
lea ecx, [esp + 0x349]
push ebx
push ecx
mov byte [esp + 0x350], bl
call fcn.10116880
add esp, 0x30
lea edi, [esp + 0x118]
call fcn.10039e30
lea esi, [esp + 0x320]
mov edi, eax
call fcn.1004eee0
mov esi, eax
cmp edi, ebx
je 0x1001d129
cmp byte [esp + 0x118], bl
je 0x1001d129
lea eax, [esp + 0x118]
inc eax
cmp byte [eax], bl
jne 0x1001d101
lea edx, [esp + 0x118]
sub eax, edx
je 0x1001d129
cmp byte [esp + eax + 0x117], 0x5c
je 0x1001d129
push 0x10149ea8
mov eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp esi, ebx
je 0x1001d16c
cmp byte [esp + 0x320], bl
je 0x1001d16c
lea eax, [esp + 0x320]
lea ecx, [ecx]
inc eax
cmp byte [eax], bl
jne 0x1001d140
lea ecx, [esp + 0x320]
sub eax, ecx
je 0x1001d16c
cmp byte [esp + eax + 0x31f], 0x5c
je 0x1001d16c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x10149ea8
mov edx, ecx
push edx
call esi
jmp 0x1001d172
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp edi, 1
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
jne 0x1001d1eb
lea eax, [esp + 0x118]
push eax
lea ecx, [esp + 0x18]
push ecx
call edi
cmp byte [esp + 0x14], bl
je 0x1001d1b4
lea eax, [esp + 0x14]
inc eax
cmp byte [eax], bl
jne 0x1001d196
lea edx, [esp + 0x14]
sub eax, edx
je 0x1001d1b4
cmp byte [esp + eax + 0x13], 0x5c
je 0x1001d1b4
push 0x10149ea8
mov eax, edx
push eax
call esi
push str.filelist.dat
lea ecx, [esp + 0x18]
push ecx
call esi
lea eax, [esp + 0x14]
call fcn.10044c10
cmp eax, 0xffffffff
je 0x1001d1e2
test al, 7
je 0x1001d1e2
push 0x80
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x14]
call fcn.10033960
mov eax, dword [esp + 0x10]
push ebx
push eax
push ebp
call fcn.1003c7a0
mov esi, eax
cmp esi, 1
jne 0x1001d285
cmp byte [esp + 0x14], bl
je 0x1001d285
push ebp
lea ecx, [esp + 0x220]
push ecx
call edi
lea ecx, [esp + 0x21c]
call fcn.10049c40
push str.filelist.dat
lea edx, [esp + 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
push ebx
xor edx, edx
lea ecx, [esp + 0x224]
call fcn.10044660
add esp, 8
test eax, eax
jne 0x1001d285
lea eax, [esp + 0x21c]
call fcn.10044c10
cmp eax, 0xffffffff
je 0x1001d271
test al, 7
je 0x1001d271
push 0x80
lea eax, [esp + 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
lea edi, [esp + 0x18]
lea ebx, [esp + 0x220]
call fcn.10063ba0
add esp, 4
mov ecx, dword [esp + 0x424]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1010d699
add esp, 0x418
ret 8
Function at 0x1001e440
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x1016c160
push 0x10118480
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x1017455c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x22c], edi
mov dword [ebp - 0x228], 0
mov byte [ebp - 0x224], 0
push 0x207
push 0
lea eax, [ebp - 0x223]
push eax
call fcn.10116880
add esp, 0xc
mov dword [ebp - 4], 0
test esi, esi
jne 0x1001e4da
test edi, edi
je 0x1001e4cc
push str.ZippedFName_Parameter_cannot_be_NULL..
push edi
call fcn.1010d6a8
add esp, 8
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
jmp 0x1001e598
cmp byte [esi], 0
jne 0x1001e52e
lea ecx, [ebp - 0x224]
push ecx
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x1001e519
test edi, edi
je 0x1001e50e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_getTempPath.__GetLastError_:__u_
push edi
call fcn.1010d6a8
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
jmp 0x1001e598
push esi
push 0
push 0x1014c820
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push ebx
push esi
call fcn.1002cd30
add esp, 8
mov dword [0x10192624], eax
test eax, eax
jne 0x1001e556
test edi, edi
je 0x1001e58b
push esi
push str.Unable_to_Create_ZIP_FILE:__s_
push edi
call fcn.1010d6a8
add esp, 0xc
jmp 0x1001e58b
mov dword [ebp - 0x228], 1
mov eax, dword [ebp + 0x10]
mov dword [0x10192628], eax
jmp 0x1001e58b
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.1010d699
mov esp, ebp
pop ebp
ret 0x10
Function at 0x1002aa10
Capabilities:
Get disk size

Disassembly:
sub esp, 0xc
push ebx
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
mov ebx, eax
test ebx, ebx
je 0x1002aa8d
mov eax, dword [esp + 0x14]
imul eax, dword [esp + 4]
push esi
cdq
push edi
mov esi, eax
mov eax, dword [esp + 0x10]
mov edi, edx
push edi
cdq
push esi
push edx
push eax
call fcn.1011e420
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
mov eax, dword [esp + 0x28]
mov dword [ecx + 4], edx
test eax, eax
je 0x1002aa72
mov edx, dword [ecx]
mov dword [eax], edx
mov ecx, dword [ecx + 4]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x14]
push edi
cdq
push esi
push edx
push eax
call fcn.1011e420
mov ecx, dword [esp + 0x24]
pop edi
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov eax, ebx
pop esi
pop ebx
add esp, 0xc
ret 0x10
Function at 0x1002ab30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x320
mov eax, dword [0x1017455c]
xor eax, esp
mov dword [esp + 0x31c], eax
push ebx
mov ebx, dword [esp + 0x32c]
push esi
mov esi, dword [esp + 0x32c]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1002ab67
xor eax, eax
jmp 0x1002ace2
push 0
lea eax, [esp + 0x1c]
push eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov esi, eax
test esi, esi
je 0x1002ace0
cmp esi, 0x104
jb 0x1002ab9b
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
jmp 0x1002ace0
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
test eax, eax
jl 0x1002ace0
push 0x104
lea edx, [esp + 0x120]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x24]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_AreFileApisANSI]
neg eax
sbb eax, eax
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1002abf4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1002abed
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
jmp 0x1002acd4
mov eax, dword [esp + 8]
mov ecx, dword [eax]
push 0
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x128]
push edx
push 0
push 0
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
jge 0x1002ac4c
mov ecx, eax
and ecx, 0x1fff0000
cmp ecx, 0x70000
jne 0x1002ac3d
movzx edx, ax
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
jmp 0x1002acd4
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
jmp 0x1002acd4
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov esi, eax
test esi, esi
jne 0x1002ac72
cmp byte [esp + 0x18], al
je 0x1002ac72
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1002aca8
push edi
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, dword [esp + 0x338]
lea edi, [esi + 1]
cmp edi, eax
jbe 0x1002ac9a
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, edi
jmp 0x1002aca7
push eax
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
pop edi
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x1002acd4
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
push ecx
push eax
call edx
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, esi
mov ecx, dword [esp + 0x324]
pop esi
pop ebx
xor ecx, esp
call fcn.1010d699
add esp, 0x320
ret 0xc
Function at 0x1002ad80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x148
mov eax, dword [0x1017455c]
xor eax, esp
mov dword [esp + 0x144], eax
cmp dword [ebp + 0xc], 0
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
jne 0x1002ae25
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1002ae2d
lea eax, [esp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x1002ae2d
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x1c]
mov dword [esi], ecx
mov ecx, dword [esp + 0x14]
mov dword [esi + 4], edx
mov edx, dword [esp + 0x18]
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x10], edx
mov edx, dword [esp + 0x24]
mov dword [esi + 0x20], eax
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], edx
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x144]
xor ecx, esp
call fcn.1010d699
mov esp, ebp
pop ebp
ret 0xc
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x14c]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.1010d699
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1002b0e0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push esi
mov esi, eax
push edi
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x1002b106
mov eax, 0x200
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov eax, dword [esp + 0x28]
mov edx, eax
xor ebp, ebp
and edx, 1
je 0x1002b118
mov ebp, 1
test al, 2
je 0x1002b11f
or ebp, 2
test al, 4
je 0x1002b126
or ebp, 4
mov ecx, eax
and ecx, 0x10
je 0x1002b130
or ebp, 0x10
test al, 0x20
je 0x1002b137
or ebp, 0x20
test ecx, ecx
je 0x1002b143
or ebp, 0x40000000
jmp 0x1002b149
or ebp, 0x80000000
or ebp, 0x1000000
test edx, edx
jne 0x1002b159
or ebp, 0x800000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x14], eax
cmp eax, 0x28
jbe 0x1002b207
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 2
lea edx, [esp + 0x1c]
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
push 0
lea eax, [esp + 0x1c]
push eax
push 4
lea ecx, [esp + 0x28]
push ecx
push esi
call ebx
mov edx, 0x54ad
cmp word [esp + 0x10], dx
jne 0x1002b207
mov eax, dword [esp + 0x1c]
lea ecx, [eax + 0x34]
cmp dword [esp + 0x14], ecx
jbe 0x1002b207
push 0
push 0
push eax
push esi
call edi
push 0
lea edx, [esp + 0x1c]
push edx
push 4
lea eax, [esp + 0x2c]
push eax
push esi
call ebx
mov eax, dword [esp + 0x20]
cmp eax, 0x5a4d
je 0x1002b201
cmp eax, 0x454e
je 0x1002b201
cmp eax, 0x454c
je 0x1002b201
cmp eax, 0x4550
jne 0x1002b207
or ebp, 0x400000
mov eax, dword [esp + 0x60]
test eax, eax
je 0x1002b211
mov dword [eax], ebp
mov eax, dword [esp + 0x64]
test eax, eax
je 0x1002b21f
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov esi, dword [esp + 0x68]
test esi, esi
je 0x1002b25a
push 0
mov eax, 0x8edc2e80
sub eax, 0xd53e8000
mov ecx, 0x1cad4a4
push 0x989680
sbb ecx, 0x19db1de
push ecx
push eax
mov dword [esp + 0x34], 0
call fcn.1011e460
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov esi, dword [esp + 0x6c]
test esi, esi
je 0x1002b28f
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.1002b000
movzx eax, word [esp + 0x20]
movzx ecx, word [esp + 0x24]
shl eax, 0x10
add esp, 0x10
or eax, ecx
mov dword [esi], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret
Function at 0x1002bd00
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x1002bd07
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x1002bde4
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x101446c8]
inc ecx
sub edx, 8
sub esi, 1
jne 0x1002bd20
pop edi
test edx, edx
je 0x1002be0b
jmp 0x1002bdf0
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x101446c8]
inc ecx
sub edx, 1
jne 0x1002bdf0
not eax
pop esi
ret
Function at 0x1002c000
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Write file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [esp + 0x14]
mov eax, ebx
je 0x1002c0db
mov eax, dword [esi + 0x3c]
push ebp
xor ebp, ebp
cmp eax, ebp
je 0x1002c034
cmp dword [esi + 0x40], edi
jae 0x1002c034
push eax
call fcn.1010d9f8
add esp, 4
mov dword [esi + 0x3c], ebp
cmp dword [esi + 0x3c], ebp
jne 0x1002c04b
lea eax, [edi + edi]
push eax
call fcn.1010ccc2
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
mov ecx, dword [esi + 0x3c]
push edi
push ebx
push ecx
call fcn.101162d0
add esp, 0xc
cmp edi, ebp
jbe 0x1002c0d7
lea ecx, [ecx]
mov edx, dword [esi + 0x3c]
mov bl, byte [edx + ebp]
mov edi, dword [esi + 0x30]
mov eax, dword [esi + 0x38]
movsx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x101446c8]
shr edi, 8
xor ecx, edi
mov dword [esi + 0x30], ecx
movzx ecx, cl
add ecx, dword [esi + 0x34]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0x34], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x101446c8]
and edx, 0xfffd
mov dword [esi + 0x38], eax
mov ecx, dword [esi + 0x3c]
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov byte [ecx + ebp], al
inc ebp
cmp ebp, dword [esp + 0x18]
jb 0x1002c060
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x3c]
pop ebp
mov edx, dword [esi + 0x20]
test edx, edx
je 0x1002c117
mov ecx, dword [esi + 0x24]
add dword [esi + 0x44], edi
lea ebx, [ecx + edi]
cmp ebx, dword [esi + 0x28]
jb 0x1002c0ff
pop edi
mov dword [esi + 0x14], 0x30000
pop esi
xor eax, eax
pop ebx
ret 8
push edi
push eax
add ecx, edx
push ecx
call fcn.101162d0
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 8
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x1002c138
push 0
lea edx, [esp + 0x18]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
ret 8
pop edi
mov dword [esi + 0x14], 0x1000000
pop esi
xor eax, eax
pop ebx
ret 8

Function at 0x1002c360
Capabilities:
Read file on windows

Disassembly:
push ecx
mov ecx, dword [esi + 0x7c]
push edi
test ecx, ecx
je 0x1002c3ab
mov eax, dword [esi + 0x84]
mov edi, dword [esi + 0x80]
cmp eax, edi
jae 0x1002c3e8
sub edi, eax
cmp edi, edx
jbe 0x1002c381
mov edi, edx
push edi
add eax, ecx
push eax
push ebx
call fcn.101162d0
mov eax, dword [esi + 0x70]
add dword [esi + 0x84], edi
add dword [esi + 0x6c], edi
add esp, 0xc
mov edx, edi
mov ecx, ebx
call fcn.1002bd00
mov dword [esi + 0x70], eax
mov eax, edi
pop edi
pop ecx
ret
mov eax, dword [esi + 0x74]
test eax, eax
je 0x1002c3e1
push 0
lea ecx, [esp + 8]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002c3e8
mov edi, dword [esp + 4]
mov eax, dword [esi + 0x70]
add dword [esi + 0x6c], edi
mov edx, edi
mov ecx, ebx
call fcn.1002bd00
mov dword [esi + 0x70], eax
mov eax, edi
pop edi
pop ecx
ret
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop ecx
ret
Function at 0x1002e820
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x101446c8]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x101446c8]
mov dword [edx + 8], ecx
ret

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

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
push edi
xor al, bl
movsx edi, al
xor edi, edx
shr edx, 8
and edi, 0xff
mov ebx, dword [edi*4 + 0x101446c8]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x101446c8]
pop edi
mov dword [esi + 8], ecx
pop ebx
ret

Function at 0x1002f050
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ebx
imul esi, dword [esp + 8]
cmp byte [edi], 0
je 0x1002f082
mov ecx, dword [edi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1002f078
mov byte [edi + 8], 1
mov eax, dword [esp + 8]
xor edx, edx
div ebx
pop esi
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
push ebp
lea ebp, [ecx + esi]
cmp ebp, eax
pop ebp
jbe 0x1002f095
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
push esi
add eax, ecx
push eax
push edx
call fcn.101162d0
add dword [edi + 0x1c], esi
mov eax, esi
add esp, 0xc
xor edx, edx
div ebx
pop esi
ret
Function at 0x1002f260
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
cmp byte [esi], 0
je 0x1002f2a5
cmp byte [esi + 1], 0
je 0x1002f2ad
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebp
je 0x1002f2c2
cmp byte [esi + 1], 0
je 0x1002f2b4
mov eax, dword [esi + 4]
push 1
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub eax, dword [esi + 0xc]
mov ebp, eax
mov dword [esp + 4], ebp
jmp 0x1002f2cb
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x1002f27e
or eax, 0xffffffff
add esp, 0x18
ret
mov dword [esp + 4], 0
mov ebp, dword [esp + 4]
jmp 0x1002f2cb
mov edx, dword [esi + 0x1c]
mov dword [esp + 4], edx
mov ebp, edx
push edi
mov edi, 0xffff
mov dword [esp + 0xc], edi
cmp ebp, edi
jae 0x1002f2df
mov dword [esp + 0xc], ebp
mov edi, ebp
push ebx
push 0x404
call fcn.1010dced
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x1002f2fd
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret
mov eax, 4
mov dword [esp + 0x18], 0xffffffff
cmp edi, eax
jbe 0x1002f423
add eax, 0x400
mov dword [esp + 0x14], edi
cmp eax, edi
ja 0x1002f323
mov dword [esp + 0x14], eax
mov ecx, ebp
sub ecx, dword [esp + 0x14]
mov eax, ebp
sub eax, ecx
mov dword [esp + 0x20], ecx
mov ebp, 0x404
cmp eax, 0x404
ja 0x1002f33f
mov ebp, eax
cmp byte [esi], 0
je 0x1002f364
cmp byte [esi + 1], 0
je 0x1002f423
mov eax, dword [esi + 0xc]
push 0
push 0
add eax, ecx
mov ecx, dword [esi + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x1002f367
mov dword [esi + 0x1c], ecx
cmp byte [esi], 0
je 0x1002f382
cmp byte [esi + 1], 0
je 0x1002f382
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
mov edi, ebp
je 0x1002f3aa
mov ecx, dword [esi + 4]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1002f3a4
mov byte [esi + 8], 1
mov eax, dword [esp + 0x1c]
jmp 0x1002f3d0
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x1002f3bb
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
push edi
add ecx, eax
push ecx
push ebx
call fcn.101162d0
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebp
cmp eax, 1
jne 0x1002f423
lea eax, [ebp - 3]
test eax, eax
jl 0x1002f400
dec eax
cmp byte [eax + ebx], 0x50
jne 0x1002f3fc
cmp byte [eax + ebx + 1], 0x4b
jne 0x1002f3fc
cmp byte [eax + ebx + 2], 5
jne 0x1002f3fc
cmp byte [eax + ebx + 3], 6
je 0x1002f419
test eax, eax
jge 0x1002f3e0
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x14], edx
jae 0x1002f423
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
mov edi, edx
jmp 0x1002f312
mov ecx, dword [esp + 0x20]
add eax, ecx
mov dword [esp + 0x18], eax
push ebx
call fcn.1010dc10
mov eax, dword [esp + 0x1c]
add esp, 4
pop ebx
pop edi
pop ebp
add esp, 0x18
ret