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

Disassembly:
push 0xffffffffffffffff
push 0x4290f6
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x436ee0]
xor eax, esp
mov dword [esp + 0xc0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x436ee0]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov esi, dword [esp + 0xe8]
xor ebx, ebx
mov ebp, ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x60], 0xf
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
push ebx
push esi
mov dword [esp + 0xe8], ebx
mov dword [ebp + 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebx
push ebx
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call fcn.00419547
mov ebx, eax
add esp, 4
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x407617
mov dword [ebp + 4], 0xfffffffd
jmp 0x40786d
push 0
lea eax, [esp + 0x2c]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp edi, dword [esp + 0x28]
je 0x407639
mov dword [ebp + 4], 0xffffffff
jmp 0x40786d
push edi
push ebx
call fcn.004060d0
mov edi, eax
add esp, 8
mov dword [esp + 0x1c], edi
test edi, edi
jne 0x407659
mov dword [ebp + 4], 0xfffffffe
jmp 0x40786d
lea ecx, [esp + 0x64]
push ecx
lea esi, [edi + 0x58]
call fcn.00408730
mov edx, dword [edi + 0x40]
push edx
lea eax, [esp + 0x6c]
push esi
push eax
call fcn.00408770
lea ecx, [esp + 0xd4]
push ecx
lea edx, [esp + 0x78]
push edx
call fcn.00408810
lea eax, [edi + 0x48]
lea edx, [esp + 0xdc]
add esp, 0x18
mov ecx, 0x10
sub edx, eax
jmp 0x4076a0
mov ebx, dword [edx + eax]
cmp ebx, dword [eax]
jne 0x40764d
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x4076a0
xor ebx, ebx
mov dword [ebp + 4], ebx
mov dword [esp + 0x18], ebx
cmp dword [edi + 0x44], ebx
jbe 0x40786d
jmp 0x4076c8
xor ebx, ebx
push ebx
push 0x42a89c
lea ecx, [esp + 0x50]
call fcn.004026b0
mov eax, dword [esi + 4]
push eax
lea edi, [esi + 0x18]
push edi
lea ecx, [esp + 0x50]
call fcn.00402790
add edi, dword [esi + 4]
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], 0
mov ecx, dword [esi]
push ecx
push edi
lea edx, [esp + 0x34]
push edx
mov ecx, ebp
mov byte [esp + 0xec], 1
call fcn.004067f0
mov ebx, dword [esp + 0x40]
test ebx, ebx
je 0x4077fc
push ebx
call fcn.00419547
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x407821
cmp dword [esp + 0x44], 0x10
mov eax, dword [esp + 0x30]
jae 0x407742
lea eax, [esp + 0x30]
push ebx
push eax
push ebp
call fcn.00419bf0
lea eax, [esp + 0x70]
push eax
call fcn.00408730
push ebx
lea ecx, [esp + 0x78]
push ebp
push ecx
call fcn.00408770
lea edx, [esp + 0xe0]
push edx
lea eax, [esp + 0x84]
push eax
call fcn.00408810
lea eax, [esi + 8]
lea edx, [esp + 0xe8]
add esp, 0x24
sub edx, eax
mov ecx, 0x10
mov dword [esp + 0x24], edx
jmp 0x407794
mov edx, dword [esp + 0x24]
mov edx, dword [edx + eax]
cmp edx, dword [eax]
jne 0x407842
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x407790
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x48]
push eax
add ecx, 0x10
call fcn.004073e0
mov dword [eax], ebp
mov dword [eax + 4], ebx
mov esi, dword [esi]
add esi, edi
cmp dword [esp + 0x44], 0x10
mov byte [esp + 0xe0], 0
jb 0x4077e0
mov ecx, dword [esp + 0x30]
push ecx
call fcn.0040e8fb
add esp, 4
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [edx + 0x44]
jb 0x4076c6
jmp 0x40786d
cmp dword [esp + 0x44], 0x10
mov dword [ebp + 4], 0xfffffffe
mov byte [esp + 0xe0], 0
jb 0x40786d
mov eax, dword [esp + 0x30]
push eax
call fcn.0040e8fb
add esp, 4
jmp 0x40786d
cmp dword [esp + 0x44], 0x10
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], 0xfffffffd
mov byte [esp + 0xe0], 0
jb 0x407869
mov edx, dword [esp + 0x30]
push edx
jmp 0x407861
cmp dword [esp + 0x44], 0x10
mov eax, dword [esp + 0x14]
mov dword [eax + 4], 0xfffffffe
mov byte [esp + 0xe0], 0
jb 0x407869
mov ecx, dword [esp + 0x30]
push ecx
call fcn.0040e8fb
add esp, 4
mov ebp, dword [esp + 0x14]
cmp dword [ebp + 4], 0
jne 0x40787d
cmp dword [esp + 0xec], 1
jne 0x407884
mov ecx, ebp
call fcn.00406e80
mov eax, dword [esp + 0x20]
test eax, eax
je 0x407895
push eax
call fcn.0041946a
add esp, 4
xor edx, edx
cmp dword [ebp + 4], edx
sete dl
cmp dword [esp + 0x60], 0x10
mov esi, edx
jb 0x4078b3
mov eax, dword [esp + 0x4c]
push eax
call fcn.0040e8fb
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.00418f7f
add esp, 0xd0
ret 8