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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
cmp dword [ebp + 8], ebx
je 0x408f51
cmp dword [ebp + 0x14], 1
jl 0x408f51
mov edi, dword [ebp + 0x10]
cmp edi, 1
jl 0x408f51
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
je 0x408f51
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x408f51
fldz
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocString
push dword [ebp + 8]
mov byte [ecx], bl
fstp qword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp + 8], esi
cmp esi, ebx
je 0x408f51
cmp esi, 0xffffffff
je 0x408f51
mov eax, dword [ebp + 0x14]
dec eax
movzx eax, ax
mov dword [ebp - 0x10], eax
dec edi
movzx eax, di
push ebx
push esi
mov dword [ebp - 0x14], eax
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [eax + 0x1000]
mov dword [ebp - 8], eax
mov eax, 0x1000
cmp ecx, eax
jbe 0x408d7e
mov eax, ecx
push 1
push eax
call fcn.004462a8
pop ecx
pop ecx
mov dword [ebp + 0x14], eax
cmp eax, ebx
je 0x408f45
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push esi
call edi
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [ebp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor esi, esi
cmp dword [ebp - 8], ebx
jbe 0x408f38
mov eax, dword [ebp + 0x14]
mov cl, byte [esi + eax]
cmp cl, 9
jne 0x408ddc
cmp byte [esi + eax + 1], 8
jne 0x408ddc
add esi, 6
mov cl, byte [esi + eax]
cmp cl, 0x10
jne 0x408ddc
inc dword [ebp + 0x10]
cmp cl, 0x7e
jne 0x408e0a
cmp byte [esi + eax + 1], 2
jne 0x408e0a
movzx edx, byte [esi + eax + 4]
cmp dx, word [ebp - 0x10]
jne 0x408e0a
movzx edx, byte [esi + eax + 6]
cmp dx, word [ebp - 0x14]
jne 0x408e0a
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp + 0xc]
je 0x408edc
cmp cl, 3
jne 0x408e38
cmp byte [esi + eax + 1], 2
jne 0x408e38
movzx edx, byte [esi + eax + 4]
cmp dx, word [ebp - 0x10]
jne 0x408e38
movzx edx, byte [esi + eax + 6]
cmp dx, word [ebp - 0x14]
jne 0x408e38
mov edx, dword [ebp + 0xc]
cmp dword [ebp + 0x10], edx
je 0x408f12
cmp cl, 4
jne 0x408ed0
cmp byte [esi + eax + 1], 2
jne 0x408ed0
movzx ecx, byte [esi + eax + 4]
cmp cx, word [ebp - 0x10]
jne 0x408ed0
movzx ecx, byte [esi + eax + 6]
cmp cx, word [ebp - 0x14]
jne 0x408ed0
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x10], ecx
jne 0x408ed0
push ebx
push ebx
add esi, 0xa
push esi
push dword [ebp + 8]
mov dword [ebp - 4], 2
call edi
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
inc esi
push ebx
inc esi
push esi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
call edi
mov ecx, dword [ebp - 0x18]
mov eax, 0xff
cmp ecx, eax
mov dword [ebp - 4], ecx
jl 0x408eb0
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp + 0x18]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
mov byte [eax + ecx], bl
mov eax, dword [ebp + 0x14]
inc esi
cmp esi, dword [ebp - 8]
jb 0x408dbc
jmp 0x408f3b
push ebx
push ebx
add esi, 0xa
push esi
push dword [ebp + 8]
call edi
push 4
pop eax
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
call fcn.004078fb
mov eax, dword [ebp + 0x1c]
fstp qword [eax]
jmp 0x408f38
push ebx
push ebx
add esi, 0xa
push esi
push dword [ebp + 8]
call edi
push 8
pop eax
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x1c]
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
push eax
call fcn.00445e06
mov esi, dword [ebp + 8]
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
jmp 0x408f53
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x18