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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
xor ecx, ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040358c
xor eax, eax
push ebp
push 0x416894
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call fcn.00403218
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 4]
mov edx, 0x4168f0
call fcn.004033e8
mov eax, dword [ebp - 0x38]
call fcn.0040359c
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x416538
mov eax, 0x416900
call fcn.004128f8
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
jmp 0x416868
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x416573
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
mov eax, 0x416910
call fcn.004128f8
jmp 0x416868
mov eax, dword [ebp - 0x10]
mov ecx, 7
xor edx, edx
div ecx
mov dword [ebp - 0x1c], edx
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
cmp dword [ebp - 0x1c], 0
jbe 0x4165b1
mov eax, dword [ebp - 0x10]
add eax, 7
jae 0x4165a4
call fcn.00402a08
sub eax, dword [ebp - 0x1c]
jae 0x4165ae
call fcn.00402a08
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x34]
mov ecx, 1
mov edx, dword [0x416480]
call fcn.00403d10
add esp, 4
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
xor eax, eax
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x4165e3
cmp eax, dword [edx - 4]
jb 0x4165e8
call fcn.00402a00
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x10]
jae 0x416637
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x41661b
cmp eax, dword [edx - 4]
jb 0x416620
call fcn.00402a00
lea eax, [edx + eax]
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x18]
jae 0x416630
call fcn.00402a08
xor ecx, ecx
call fcn.004027e8
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
imul eax, dword [ebp - 0x10], 8
jae 0x41664b
call fcn.00402a08
mov ecx, 7
xor edx, edx
div ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
call fcn.0040367c
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 1
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
jae 0x416859
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x4166a7
cmp eax, dword [edx - 4]
jb 0x4166ac
call fcn.00402a00
add edx, eax
lea eax, [ebp - 0x27]
mov ecx, 7
call fcn.0040441c
xor eax, eax
mov al, byte [ebp - 0x27]
shr eax, 1
cmp eax, 0x7f
jbe 0x4166cc
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x2f], al
xor eax, eax
mov al, byte [ebp - 0x27]
shl eax, 6
and eax, 0x40
xor edx, edx
mov dl, byte [ebp - 0x26]
shr edx, 2
add eax, edx
jno 0x4166f1
call fcn.00402a08
cmp eax, 0x7f
jbe 0x4166fb
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x2e], al
xor eax, eax
mov al, byte [ebp - 0x26]
shl eax, 5
and eax, 0x60
xor edx, edx
mov dl, byte [ebp - 0x25]
shr edx, 3
add eax, edx
jno 0x416720
call fcn.00402a08
cmp eax, 0x7f
jbe 0x41672a
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x2d], al
xor eax, eax
mov al, byte [ebp - 0x25]
shl eax, 4
and eax, 0x70
xor edx, edx
mov dl, byte [ebp - 0x24]
shr edx, 4
add eax, edx
jno 0x41674f
call fcn.00402a08
cmp eax, 0x7f
jbe 0x416759
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x2c], al
xor eax, eax
mov al, byte [ebp - 0x24]
shl eax, 3
and eax, 0x78
xor edx, edx
mov dl, byte [ebp - 0x23]
shr edx, 5
add eax, edx
jno 0x41677e
call fcn.00402a08
cmp eax, 0x7f
jbe 0x416788
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x2b], al
xor eax, eax
mov al, byte [ebp - 0x23]
shl eax, 2
and eax, 0x7c
xor edx, edx
mov dl, byte [ebp - 0x22]
shr edx, 6
add eax, edx
jno 0x4167ad
call fcn.00402a08
cmp eax, 0x7f
jbe 0x4167b7
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x2a], al
xor eax, eax
mov al, byte [ebp - 0x22]
add eax, eax
and eax, 0x7e
xor edx, edx
mov dl, byte [ebp - 0x21]
shr edx, 7
add eax, edx
jno 0x4167db
call fcn.00402a08
cmp eax, 0x7f
jbe 0x4167e5
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x29], al
mov al, byte [ebp - 0x21]
and al, 0x7f
and eax, 0xff
cmp eax, 0x7f
jbe 0x416802
call fcn.00402a00
mov al, byte [eax + 0x41d1fc]
mov byte [ebp - 0x28], al
mov eax, dword [ebp - 8]
call fcn.004035ec
mov edx, dword [ebp - 0x20]
dec edx
test eax, eax
je 0x416820
cmp edx, dword [eax - 4]
jb 0x416825
call fcn.00402a00
inc edx
lea eax, [eax + edx - 1]
lea edx, [ebp - 0x2f]
mov ecx, 8
call fcn.0040441c
add dword [ebp - 0x1c], 7
jae 0x416842
call fcn.00402a08
add dword [ebp - 0x20], 8
jae 0x41684d
call fcn.00402a08
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
jb 0x416698
mov eax, 0x41eb74
mov edx, 0x4168a8
call fcn.0040326c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41689b
lea eax, [ebp - 0x38]
call fcn.00403218
lea eax, [ebp - 0x34]
mov edx, dword [0x416480]
call fcn.00403d1c
lea eax, [ebp - 4]
call fcn.00403218
ret