Function at 0x5d91c0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor esi, esi
push esi
push esi
xor ecx, ecx
push ecx
mov eax, 8
push eax
mov eax, dword [ebx + 0x208]
lea edi, [ebx + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
lea esi, [esp + 0x4c]
call fcn.005d8ea0
cmp dword [esp + 0x4c], 0x64657363
je 0x5d9219
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea esi, [ebx + 0x20c]
call fcn.005d8f10
mov byte [esp + 0xf], 0
lea esp, [esp]
lea esi, [esp + 0x4c]
call fcn.005d8ea0
mov edx, dword [edi]
push 1
lea ecx, [esp + 0x24]
push ecx
xor eax, eax
push eax
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor esi, esi
test eax, eax
jne 0x5d925d
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
jmp 0x5d926d
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x4c]
cmp eax, 0x64617461
je 0x5d9300
cmp eax, 0x6b756b69
je 0x5d92dd
cmp eax, 0x70616b74
jne 0x5d93ad
lea esi, [ebx + 0x22c]
call fcn.005d9040
push 1
lea edx, [esp + 0x2c]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x5d92b7
xor ecx, ecx
jmp 0x5d92bf
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [ebx + 0x244], eax
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x248], ecx
lea ecx, [eax - 0x18]
mov dword [ebx + 0x24c], ecx
jmp 0x5d93b1
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov dword [ebx + 0x254], eax
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x250], edx
mov dword [ebx + 0x258], eax
jmp 0x5d93b1
mov eax, dword [edi]
push esi
lea ecx, [esp + 0x18]
push ecx
push 4
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
add edx, 4
adc eax, esi
bswap ecx
mov dword [ebx + 0x25c], ecx
mov ecx, dword [esp + 0x54]
mov dword [ebx + 0x264], eax
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x260], edx
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
jne 0x5d9395
mov ecx, dword [edi]
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x5d9366
xor ecx, ecx
jmp 0x5d936e
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
sub eax, dword [ebx + 0x260]
mov byte [esp + 0xf], 1
sbb ecx, dword [ebx + 0x264]
mov dword [ebx + 0x268], eax
mov dword [ebx + 0x26c], ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
jmp 0x5d93b5
mov edx, eax
add edx, 0xfffffffc
mov esi, ecx
adc esi, 0xffffffff
mov dword [ebx + 0x268], edx
mov dword [ebx + 0x26c], esi
jmp 0x5d93b5
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
add eax, dword [esp + 0x18]
adc ecx, dword [esp + 0x1c]
mov esi, eax
lea eax, [esp + 0x38]
mov dword [esp + 0x44], ecx
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x5d93e7
mov edx, dword [esp + 0x44]
cmp edx, dword [esp + 0x3c]
jb 0x5d93ec
ja 0x5d93e7
cmp esi, dword [esp + 0x38]
jb 0x5d93ec
mov byte [esp + 0xf], 1
mov eax, dword [esp + 0x44]
mov ecx, dword [edi]
push 0
push 0
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
cmp byte [esp + 0xf], 0
je 0x5d9230
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4