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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4684
call fcn.0041e950
push 0xc
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.0041e980
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x4108de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x442c], eax
cmp dword [ebp - 0x442c], 0x7b
je 0x410838
xor eax, eax
jmp 0x410ad6
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov eax, dword [ebp + 8]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x4684], eax
mov ecx, dword [ebp - 0x4684]
push ecx
lea edx, [ebp - 0x4428]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [ebp - 0x467c]
push edx
lea eax, [ebp - 0x4428]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x4680], eax
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
lea ecx, [ebp - 0x4650]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x4680]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x28], 0xffffffff
jne 0x4108de
xor eax, eax
jmp 0x410ad6
push 0
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x24], eax
cmp dword [ebp + 0x14], 0
jge 0x4108f9
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 0x14], ecx
cmp dword [ebp + 0x10], 0
jl 0x41090f
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp - 0x24]
jg 0x41090f
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 0x14]
jle 0x410920
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x410ad6
mov edx, dword [ebp + 0x14]
sub edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov ecx, dword [ebp + 0x14]
sub ecx, dword [ebp + 0x10]
shr ecx, 0xe
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp + 0x10]
xor edx, edx
mov ecx, 0x4000
div ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x18], 0x1000
push 0
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x10], 0
jmp 0x41097b
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 8]
jge 0x410a08
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x4000
lea ecx, [ebp - 0x4028]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
add ecx, dword [ebp - 0x4028]
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], ecx
lea eax, [ebp - 0x4028]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], 0
jmp 0x4109d9
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0xc]
add edx, 4
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jge 0x410a03
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx]
imul edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
add ecx, edx
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
jmp 0x4109c7
jmp 0x410972
cmp dword [ebp - 4], 0
jle 0x410ac7
mov eax, dword [ebp - 4]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 4]
and ecx, 0x80000003
jns 0x410a31
dec ecx
or ecx, 0xfffffffc
inc ecx
test ecx, ecx
je 0x410a3e
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x402c], 0
push 0
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0x4028]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
add eax, dword [ebp - 0x4028]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 8], eax
lea edx, [ebp - 0x4028]
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], 0
jmp 0x410a9d
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x18]
jge 0x410ac7
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
imul ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
add eax, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
jmp 0x410a8b
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov esp, ebp
pop ebp
ret