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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040a78c
xor eax, eax
push ebp
push 0x5d707e
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 4]
call fcn.0040b5c8
mov eax, dword [ebp - 0x20]
call fcn.005d4a88
test al, al
jne 0x5d6e17
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d709c
call fcn.0055f2c8
jmp 0x5d7050
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 4]
call fcn.0040b4d8
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
cmp esi, 0xffffffff
jne 0x5d6e5b
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d70e0
call fcn.0055f2c8
jmp 0x5d7050
lea eax, [ebp - 0x18]
push eax
push esi
call sub.kernel32.dll_GetFileSizeEx
cmp dword [ebp - 0x14], 0
jne 0x5d6e73
cmp dword [ebp - 0x18], 8
jae 0x5d6e98
jmp 0x5d6e75
jge 0x5d6e98
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d7118
call fcn.0055f2c8
jmp 0x5d7050
lea eax, [ebp - 8]
mov edx, dword [0x5d3f80]
call fcn.0040d96c
push 4
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x5d3f80]
call fcn.0040d848
add esp, 4
push 0
push 0
push 0
push 0
push esi
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
mov eax, dword [ebp - 8]
push eax
push esi
call sub.kernel32.dll_ReadFile
cmp dword [ebp - 0x1c], 4
je 0x5d6f07
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d7154
call fcn.0055f2c8
jmp 0x5d7050
mov eax, dword [ebp - 8]
cmp byte [eax], 0x54
jne 0x5d6f2a
mov eax, dword [ebp - 8]
cmp byte [eax + 1], 0x44
jne 0x5d6f2a
mov eax, dword [ebp - 8]
cmp byte [eax + 2], 0x4b
jne 0x5d6f2a
mov eax, dword [ebp - 8]
cmp byte [eax + 3], 0x46
je 0x5d6f4d
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d7118
call fcn.0055f2c8
jmp 0x5d7050
push 0
push 0
push 0
push 4
push esi
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
mov eax, dword [ebp - 8]
push eax
push esi
call sub.kernel32.dll_ReadFile
cmp dword [ebp - 0x1c], 4
je 0x5d6f96
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d7154
call fcn.0055f2c8
jmp 0x5d7050
lea eax, [ebp - 8]
call fcn.005d50b4
mov ecx, eax
mov eax, dword [ebp - 0x18]
cmp ecx, eax
je 0x5d6fca
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d7118
call fcn.0055f2c8
jmp 0x5d7050
push 0
push 0
push 0
push 8
push esi
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
mov eax, dword [ebp - 8]
push eax
push esi
call sub.kernel32.dll_ReadFile
cmp dword [ebp - 0x1c], 4
je 0x5d700c
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d7154
call fcn.0055f2c8
jmp 0x5d7050
lea eax, [ebp - 8]
call fcn.005d50b4
mov ecx, eax
mov eax, ecx
shl eax, 4
lea eax, [eax + eax*2]
add eax, 0xc
mov ecx, eax
mov eax, dword [ebp - 0x18]
cmp ecx, eax
je 0x5d7046
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x5d7050
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d7194
call fcn.0055f2c8
jmp 0x5d7050
push esi
call sub.kernel32.dll_CloseHandle
mov byte [ebp - 9], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5d7085
lea eax, [ebp - 0x20]
call fcn.0040a6e0
lea eax, [ebp - 8]
mov edx, dword [0x5d3f80]
call fcn.0040d96c
lea eax, [ebp - 4]
call fcn.0040a698
pop eax
jmp eax