joyce8/EMBER2024-capa huggingface dataset:
Function at 0x449270
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
cmp edi, 2
jge 0x449284
mov eax, 0x17
pop edi
pop ebp
ret
push ebx
mov ebx, dword [ebp + 8]
push esi
movzx eax, byte [ebx + edi - 1]
movzx ecx, byte [ebx]
movzx eax, byte [eax + 0x5201f8]
movzx ecx, byte [ecx + 0x5201f8]
lea eax, [eax + eax*2]
shl ecx, 2
xor eax, ecx
xor eax, edi
cdq
mov ecx, 0x7f
idiv ecx
movzx esi, byte [edx + str.Pk_]
dec esi
js 0x4492f1
jmp 0x4492c0
movzx eax, byte [esi + 0x51fc68]
cmp eax, edi
jne 0x4492e7
movzx eax, word [esi*2 + 0x51fce0]
push edi
add eax, str.ABORTABLEFTEMPORARYADDATABASELECTHENDEFAULTRANSACTIONATURALTERAISEACHECKEYAFTEREFERENCESCAPELSEXCEPTRIGGEREGEXPLAINITIALLYANALYZEXCLUSIVEXISTSTATEMENTANDEFERRABLEATTACHAVINGLOBEFOREIGNOREINDEXAUTOINCREMENTBEGINNERENAMEBETWEENOTNULLIKEBYCASCADEFERREDELETECASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSSCURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCHFAILIMITFROMFULLGROUPDATEIFIMMEDIATEINSERTINSTEADINTOFFSETISNULLJOINORDEREPLACEOUTERESTRICTPRIMARYQUERYRIGHTROLLBACKROWHENUNIONUNIQUEUSINGVACUUMVALUESVIEWHEREVIRTUAL
push ebx
push eax
call fcn.0044ca30
add esp, 0xc
test eax, eax
je 0x4492fb
movzx esi, byte [esi + 0x51fbf0]
dec esi
jns 0x4492c0
pop esi
pop ebx
mov eax, 0x17
pop edi
pop ebp
ret
movzx eax, byte [esi + 0x51fdd0]
pop esi
pop ebx
pop edi
pop ebp
ret

Function at 0x449320
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00449270
Function at 0x45a630
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x507b13
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x564690]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov dword [edi + 4], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov byte [edi + 0x20], 0
mov dword [edi + 0x24], 0
mov dword [edi], 0x5213e8
mov eax, dword [0x5641c0]
mov ecx, 0x5641c0
mov dword [ebp - 4], 0
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi + 0x28], eax
push dword [ebp + 8]
lea ecx, [edi + 0x28]
mov byte [ebp - 4], 1
call fcn.004025b0
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x2c], eax
mov dword [edi + 0x30], 0
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 8

Function at 0x45d480
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x564690]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ebp + 8]
push esi
mov esi, dword [0x568d8c]
push edi
push 0xf0
push eax
push esi
mov dword [ebp - 0x10c], ecx
mov edi, 1
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x45d60e
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x45d60e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x45d60e
mov edx, 0x1234
push ebx
movzx eax, word [esi]
xor ecx, ecx
cmp cx, ax
je 0x45d5f9
mov ecx, dword [esi + 4]
mov ebx, eax
movzx eax, word [esi + 2]
mov dword [ebp - 0x110], ecx
mov ecx, 0x403
add esi, 8
cmp cx, ax
jne 0x45d56e
push 3
lea eax, [ebp - 0x104]
push esi
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x108], eax
call fcn.0045e400
push dword [ebp - 0x108]
mov eax, dword [ebp - 0x10c]
push 0
push 0x143
push ebx
push dword [eax + 4]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
xor ecx, ecx
cmp eax, 0xffffffff
mov eax, dword [ebp - 0x108]
cmove edi, ecx
lea ecx, [ebp - 0x104]
cmp eax, ecx
je 0x45d5e6
push eax
call fcn.004e5bc5
add esp, 4
jmp 0x45d5e6
cmp dx, ax
jne 0x45d5eb
push 3
lea eax, [ebp - 0x104]
push esi
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x134], 1
mov dword [ebp - 0x130], 0xffffffff
mov dword [ebp - 0x108], eax
call fcn.0045e400
mov eax, dword [ebp - 0x108]
lea ecx, [ebp - 0x104]
mov dword [ebp - 0x12c], eax
cmp eax, ecx
je 0x45d5c0
push eax
call fcn.004e5bc5
add esp, 4
lea eax, [ebp - 0x134]
push eax
mov eax, dword [ebp - 0x10c]
push 0
push 0x40b
push ebx
push dword [eax + 4]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
xor ecx, ecx
cmp eax, 0xffffffff
cmove edi, ecx
mov edx, 0x1234
add esi, dword [ebp - 0x110]
test edi, edi
jne 0x45d4e6
pop ebx
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50b4
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.004e50b4
mov esp, ebp
pop ebp
ret 4
Function at 0x45ed20
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0xcf
mov esi, ecx
call fcn.0045d480
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], 0
mov dword [eax], 0
lea eax, [ebp - 4]
push eax
push 0
push esi
push 0x460c80
push 0
push 0
call fcn.004eb3c5
add esp, 0x18
mov dword [esi + 0x30], eax
push 0
push 0x3e8
push 0x5df
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4648c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x508498
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x564690]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], 0
call fcn.00465eb0
test al, al
jne 0x46494f
mov edi, dword [0x565ae0]
mov eax, edi
cdq
sub eax, edx
xor ecx, ecx
mov ebx, eax
sar ebx, 1
mov esi, 7
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ebx
test ebx, ebx
jle 0x464947
mov eax, edi
cdq
and edx, 3
lea edi, [edx + eax]
sar edi, 2
xor edx, edx
test edi, edi
jle 0x464939
mov eax, edx
mov ecx, edi
mov edi, edi
add esi, eax
dec eax
dec ecx
jne 0x464930
mov ecx, dword [ebp - 0x10]
add edx, ecx
dec ebx
jne 0x464926
mov ebx, dword [ebp - 0x14]
mov edi, dword [0x565ae0]
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, esi
jl 0x464914
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov ebx, eax
mov ecx, ebx
shr ecx, 8
movzx eax, cl
movzx edi, bl
mov dword [ebp - 0x10], eax
call fcn.00465df0
test al, al
jne 0x464982
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp ebx, 0x80000000
jae 0x46498f
mov esi, ebx
shr esi, 0x10
mov ebx, dword [ebp - 0x10]
cmp edi, 6
jb 0x4649bc
cmp ebx, 2
jb 0x4649bc
mov esi, dword [ebp + 8]
push esi
call fcn.00464a90
add esp, 4
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
mov eax, dword [0x5641c0]
mov ecx, 0x5641c0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
push esi
push ebx
push edi
lea eax, [ebp - 0x10]
push 0x521a44
push eax
mov dword [ebp - 4], 0
call fcn.00405b60
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
add esp, 0x14
mov ecx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
mov ecx, eax
jl 0x464a13
cmp ecx, dword [esi]
jne 0x464a13
mov edi, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x464a50
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x464a27
call fcn.00409c50
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.004e5c88
add esp, 0x10
lea eax, [edi + 0x10]
mov edi, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
mov dword [edi], eax
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x464a76
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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 0x465910
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x564690]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [0x565ae0]
lea ecx, [ebx + 1]
lea eax, [ebx + 2]
imul eax, ecx
imul eax, ebx
cdq
mov ecx, 0x18
idiv ecx
cmp edx, 9
jne 0x465951
push 0
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov ebx, dword [0x565ae0]
lea ecx, [ebx + 1]
lea eax, [ebx + 2]
imul eax, ecx
imul eax, ebx
cdq
mov ecx, 0x12
idiv ecx
cmp edx, 0xa
jne 0x46597a
push esi
xor ecx, ecx
lea esi, [ebp - 0xc]
inc ecx
lea esi, [esi + 1]
cmp ecx, 6
jl 0x465970
pop esi
mov eax, dword [0x55faac]
pop ebx
cmp eax, 0xffffffff
jne 0x4659c6
push pe_nt_image_headers32
lea eax, [ebp - 0x11c]
push 0
push eax
call fcn.004e6690
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
mov dword [ebp - 0x120], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, 5
cmp eax, dword [ebp - 0x11c]
sbb eax, eax
neg eax
mov dword [0x55faac], eax
mov ecx, dword [ebp - 4]
test eax, eax
setne al
xor ecx, ebp
call fcn.004e50b4
mov esp, ebp
pop ebp
ret

Function at 0x46f9c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x14]
mov ecx, 0x15
cmp eax, dword [esi + 0x18]
jl 0x46fa70
cmp byte [esi + 0x1c], 0
jne 0x46fb13
mov edi, dword [0x565ae0]
mov eax, edi
imul eax, edi
imul eax, edi
cdq
idiv ecx
cmp edx, 0xb
jne 0x46fa38
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x64
sub edi, ecx
xor ecx, ecx
lea eax, [edi + 0x2f4]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004e3b54
push eax
call fcn.004e5c83
add esp, 8
push 0
lea eax, [ebp + 8]
push eax
push dword [esi + 0xc]
push dword [esi + 0x10]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46fac1
mov eax, dword [ebp + 8]
test eax, eax
jne 0x46fa5c
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], eax
movzx eax, byte [esi + 0x1c]
neg eax
sbb eax, eax
mov dword [esi + 0x14], 0
js 0x46fabc
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
movzx edi, byte [eax + ecx]
lea eax, [ecx + 1]
mov dword [esi + 0x14], eax
cmp edi, ebx
je 0x46f9cc
call fcn.00472220
test al, al
jne 0x46faba
mov eax, 0x94
mov esi, 5
jmp 0x46faa0
test esi, esi
je 0x46fab1
cdq
idiv esi
mov ecx, esi
mov eax, ecx
mov esi, edx
test ecx, ecx
jne 0x46faa0
lea ecx, [esi + eax]
mov dword [0x565ae0], ecx
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call fcn.00466310
mov ebx, eax
push ebx
push dword [esi + 4]
push edi
push 0x4e21
call fcn.004662f0
push ebx
call fcn.004e5bc5
mov esi, dword [0x565ae0]
mov edi, 0x14
lea ecx, [esi + 1]
mov eax, ecx
imul eax, esi
cdq
idiv edi
add esp, 0x18
lea eax, [edi - 0x16]
pop edi
cmp edx, 0xf
cmove esi, ecx
mov dword [0x565ae0], esi
pop esi
pop ebx
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ebp
ret
Function at 0x46fb20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x14]
mov ecx, 0x15
cmp eax, dword [esi + 0x18]
jl 0x46fbd0
cmp byte [esi + 0x1c], 0
jne 0x46fc73
mov edi, dword [0x565ae0]
mov eax, edi
imul eax, edi
imul eax, edi
cdq
idiv ecx
cmp edx, 0xb
jne 0x46fb98
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x64
sub edi, ecx
xor ecx, ecx
lea eax, [edi + 0x2f4]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004e3b54
push eax
call fcn.004e5c83
add esp, 8
push 0
lea eax, [ebp + 8]
push eax
push dword [esi + 0xc]
push dword [esi + 0x10]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46fc21
mov eax, dword [ebp + 8]
test eax, eax
jne 0x46fbbc
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], eax
movzx eax, byte [esi + 0x1c]
neg eax
sbb eax, eax
mov dword [esi + 0x14], 0
js 0x46fc1c
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
movzx edi, word [eax + ecx]
lea eax, [ecx + 2]
mov dword [esi + 0x14], eax
cmp edi, ebx
je 0x46fb2c
call fcn.00472220
test al, al
jne 0x46fc1a
mov eax, 0x94
mov esi, 5
jmp 0x46fc00
test esi, esi
je 0x46fc11
cdq
idiv esi
mov ecx, esi
mov eax, ecx
mov esi, edx
test ecx, ecx
jne 0x46fc00
lea ecx, [esi + eax]
mov dword [0x565ae0], ecx
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call fcn.00466310
mov ebx, eax
push ebx
push dword [esi + 4]
push edi
push 0x4e21
call fcn.004662f0
push ebx
call fcn.004e5bc5
mov esi, dword [0x565ae0]
mov edi, 0x14
lea ecx, [esi + 1]
mov eax, ecx
imul eax, esi
cdq
idiv edi
add esp, 0x18
lea eax, [edi - 0x16]
pop edi
cmp edx, 0xf
cmove esi, ecx
mov dword [0x565ae0], esi
pop esi
pop ebx
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ebp
ret
Function at 0x470e20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x18]
jge 0x470e36
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x1c], 0
je 0x470e44
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [0x565ae0]
mov eax, esi
imul eax, esi
imul eax, esi
cdq
mov ecx, 0x15
idiv ecx
cmp edx, 0xb
jne 0x470e9b
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x64
sub esi, ecx
xor ecx, ecx
lea eax, [esi + 0x2f4]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004e3b54
push eax
call fcn.004e5c83
add esp, 8
push 0
lea eax, [ebp - 4]
push eax
push dword [ebx + 0xc]
push dword [ebx + 0x10]
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x470f09
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.00466310
mov edi, eax
push edi
push dword [ebx + 4]
push esi
push 0x4e21
call fcn.004662f0
push edi
call fcn.004e5bc5
mov esi, dword [0x565ae0]
mov edi, 0x14
lea ecx, [esi + 1]
mov eax, ecx
imul eax, esi
cdq
idiv edi
add esp, 0x18
lea eax, [edi - 0x16]
pop edi
cmp edx, 0xf
cmove esi, ecx
mov dword [0x565ae0], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
test eax, eax
jne 0x470f14
mov byte [ebx + 0x1c], 1
mov dword [ebx + 0x18], eax
movzx eax, byte [ebx + 0x1c]
neg eax
pop esi
mov dword [ebx + 0x14], 0
sbb eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x470f30
Capabilities:
Get disk size
Write file on windows

Disassembly:
cmp dword [ecx + 4], 1
jne 0x470f39
xor eax, eax
ret
mov ecx, dword [ecx + 0x20]
jmp fcn.00470f50
Function at 0x470f50
Capabilities:
Get disk size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b8
mov eax, dword [0x564690]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, ecx
call fcn.004721a0
test al, al
jne 0x470f85
call fcn.004e5b54
mov edx, dword [0x565ae0]
cmp edx, eax
jne 0x470f85
dec edx
mov dword [0x565ae0], edx
mov eax, dword [edi + 0x14]
test eax, eax
jle 0x4710c5
push 0
lea ecx, [ebp - 0x4b8]
push ecx
push eax
push dword [edi + 0x10]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4710be
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x565ae0]
mov ebx, eax
lea ecx, [edx + 1]
lea eax, [edx + 2]
imul eax, ecx
imul eax, edx
cdq
mov ecx, 0x17
idiv ecx
cmp edx, 8
jne 0x470fe7
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
push ebx
call fcn.00466310
mov esi, eax
call fcn.00472050
mov ecx, dword [0x566950]
mov edx, 0xe2eee7f8
test al, al
cmove ecx, edx
push esi
mov dword [0x566950], ecx
push dword [edi + 4]
push ebx
push 0x4e22
call fcn.004662f0
push esi
call fcn.004e5bc5
mov ecx, dword [0x565ae0]
add esp, 0x18
lea eax, [ecx + 1]
imul eax, ecx
cdq
mov ecx, 0x18
idiv ecx
cmp edx, 1
jne 0x4710a8
xor esi, esi
lea ecx, [ecx]
call fcn.004e5b54
movd xmm0, eax
cvtdq2pd xmm0, xmm0
inc esi
movsd qword [ebp + esi*8 - 0x4bc], xmm0
cmp esi, 0x96
jb 0x471040
xor ecx, ecx
mov eax, 0x95
cmp ecx, eax
jge 0x47109f
lea ebx, [ebx]
movsd xmm0, qword [ebp + eax*8 - 0x4b4]
movsd xmm1, qword [ebp + eax*8 - 0x4bc]
comisd xmm0, xmm1
jbe 0x47109a
movsd qword [ebp + eax*8 - 0x4b4], xmm1
movsd qword [ebp + eax*8 - 0x4bc], xmm0
dec eax
cmp eax, ecx
jg 0x471070
inc ecx
cmp ecx, 0x96
jl 0x471061
pop esi
pop ebx
mov eax, 0xfffffffe
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50b4
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x14], 0
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop edi
call fcn.004e50b4
mov esp, ebp
pop ebp
ret
Function at 0x4710e0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x10], ebx
and ebx, 0xff
push edi
mov edi, ecx
cmp eax, 1
jne 0x471117
mov dword [ebp - 8], SysStringLen
mov eax, 3
mov dword [ebp - 0xc], 0x4e23
jmp 0x4711b2
xor ecx, ecx
cmp eax, 2
setne cl
mov eax, 1
test ebx, ebx
cmove ebx, eax
mov dword [ebp - 8], 0x40000000
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], 0x4e24
lea ecx, [ecx*2 + 2]
mov dword [ebp - 4], ecx
call fcn.00472120
test al, al
jne 0x4711af
mov esi, dword [0x565ae0]
mov eax, 0x2fa0be83
imul esi
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x2b
mov eax, esi
sub eax, ecx
xor ebx, ebx
cmp eax, 0xda
je 0x4711a6
mov eax, esi
or eax, 0xffffff3c
add esi, eax
mov eax, esi
imul eax, esi
inc ebx
cmp ebx, eax
jg 0x4711a6
mov eax, 0x2fa0be83
imul esi
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x2b
mov eax, esi
sub eax, ecx
cmp eax, 0xda
jne 0x471174
mov dword [0x565ae0], ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
push 0
push 0x80
push eax
push 0
push 1
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x471288
mov ecx, dword [0x565ae0]
lea eax, [ecx + 1]
imul eax, ecx
cdq
mov ecx, 0x11
idiv ecx
cmp edx, 9
jne 0x471200
push 4
call fcn.004e48e7
mov ecx, dword [0x565ae0]
add esp, 4
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call fcn.00466310
mov ecx, dword [0x565ae0]
mov esi, eax
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
mov ebx, 0xe
idiv ebx
add esp, 4
cmp edx, 0xc
jne 0x471235
dec ecx
mov dword [0x565ae0], ecx
mov eax, dword [ebp + 8]
push esi
push edi
push eax
mov eax, dword [ebp - 0xc]
movzx eax, ax
push eax
call fcn.004662f0
add esp, 0x10
call fcn.00472220
test al, al
jne 0x471271
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push esi
call fcn.004e5bc5
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 8]
push eax
call fcn.004664f0
mov ecx, dword [ebp + 0xc]
mov dword [edi], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 0x14]
add esp, 4
mov dword [edi + 4], ecx
mov dword [edi + 8], ebx
mov byte [edi + 0x10], 0
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], esi
cmp ecx, 1
jne 0x4712c7
mov ecx, edi
call fcn.004708d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov byte [edi + 0x24], 1
cmp ecx, 3
jne 0x4712ee
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x4712ee
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov byte [edi + 0x24], 0
mov ecx, edi
call fcn.00470d60
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x472270
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x564690]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [0x565ae0]
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
mov ecx, 0x14
idiv ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
cmp edx, 6
jne 0x4722b3
lea eax, [ebp - 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
push 0
lea eax, [ebp - 0xb8]
push eax
push 1
lea eax, [ebp - 0xb1]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x47230d
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.00466310
mov edi, eax
push edi
push ebx
push esi
push 0x4e21
call fcn.004662f0
push edi
call fcn.004e5bc5
add esp, 0x18
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50b4
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0xb8], 0
je 0x47232d
movzx eax, byte [ebp - 0xb1]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50b4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.004e50b4
mov esp, ebp
pop ebp
ret
Function at 0x473cb0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov eax, ecx
push 0
push dword [eax + 0x20]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push 0x404
mov dword [ebp - 0xc], esi
call fcn.004e3b54
mov edi, eax
mov eax, 4
add esp, 4
xor ebx, ebx
cmp esi, eax
jbe 0x473d7d
mov edx, 0x404
test ebx, ebx
jne 0x473d7d
add eax, 0x400
cmp eax, esi
mov ecx, eax
cmova ecx, esi
push ebx
mov eax, esi
sub eax, ecx
push ebx
sub esi, eax
push eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp esi, 0x404
push dword [eax + 0x20]
mov dword [ebp - 0x10], ecx
cmova esi, edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
push esi
push edi
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esi - 3]
test eax, eax
jle 0x473d6a
dec eax
cmp byte [eax + edi], 0x50
jne 0x473d5f
cmp byte [eax + edi + 1], 0x4b
jne 0x473d5f
cmp byte [eax + edi + 2], 5
jne 0x473d5f
cmp byte [eax + edi + 3], 6
je 0x473d65
test eax, eax
jg 0x473d43
jmp 0x473d6a
mov ebx, dword [ebp - 8]
add ebx, eax
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov edx, 0x404
cmp eax, esi
jb 0x473cf1
push edi
call fcn.004e5c83
add esp, 4
test ebx, ebx
je 0x473d93
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push 0xffffffffffffff99
call fcn.00472ea0
int3

Function at 0x473e50
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
mov eax, ecx
xor eax, dword [ebp + 0x10]
shr ecx, 8
and eax, 0xff
mov eax, dword [edx + eax*4]
xor eax, ecx
mov ecx, dword [edi + 8]
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
and eax, 0xff
shr ecx, 8
xor ecx, dword [edx + eax*4]
mov eax, dword [ebp + 0x10]
mov dword [edi + 8], ecx
pop edi
pop ebp
ret