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

Disassembly:
mov eax, 0x462714
call fcn.00433ae8
sub esp, 0x68
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
push 0x47b67c
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x40c82c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x47b664
push eax
call esi
push 0x47b644
mov dword [ebp - 0x24], eax
push dword [ebp - 0x1c]
call esi
push 0x47b628
mov dword [ebp - 0x20], eax
push dword [ebp - 0x1c]
call esi
cmp dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], eax
je 0x40c82c
cmp dword [ebp - 0x20], ebx
je 0x40c82c
cmp eax, ebx
je 0x40c82c
lea eax, [ebp - 0x11]
push ebx
push eax
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x74], 0x469540
mov dword [ebp - 0x54], 0x469538
call fcn.004017e1
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push 0xffffffffffffffff
push dword [ebp + 0xc]
mov byte [ebp - 4], 2
push ebx
push 1
call esi
mov edi, eax
lea ecx, [ebp - 0x74]
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00408e31
mov ecx, dword [eax]
mov byte [ebp - 4], 3
mov byte [eax + 4], 1
call fcn.00408ddc
mov eax, dword [eax]
push edi
push eax
push 0xffffffffffffffff
push dword [ebp + 0xc]
push ebx
push 1
call esi
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.00408e5e
lea ecx, [ebp - 0x74]
call fcn.0040198d
push ebx
push 0x80
push 3
push ebx
push ebx
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp eax, ebx
mov byte [ebp - 4], 4
jne 0x40c83c
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0040cd25
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 1
call fcn.00401bc2
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.0040cd3f
jmp 0x40c8e7
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.00433b07
mov edi, eax
pop ecx
cmp edi, ebx
mov dword [ebp - 0x34], edi
setne byte [ebp - 0x38]
lea eax, [ebp - 0x30]
push ebx
push eax
push esi
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c87d
cmp byte [ebp - 0x38], bl
je 0x40c814
push edi
call fcn.0043311a
pop ecx
jmp 0x40c814
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x2c]
push eax
push 0xffffffffffffffff
push ebx
push 4
push esi
push edi
push ebx
call dword [ebp - 0x20]
cmp eax, ebx
je 0x40c8a6
cmp dword [ebp - 0x2c], ebx
jne 0x40c8fa
cmp byte [ebp - 0x38], bl
je 0x40c8b2
push edi
call fcn.0043311a
pop ecx
cmp dword [ebp - 0x18], ebx
je 0x40c8c8
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40c8c8
push dword [ebp - 0x18]
call eax
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 1
call fcn.00401bc2
cmp dword [ebp - 0x1c], ebx
je 0x40c8e7
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp eax, ebx
je 0x40c8e7
push dword [ebp - 0x1c]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
push dword [ebp + 8]
mov eax, dword [ebp - 0x40]
push dword [eax + 0xc]
push 1
call dword [ebp - 0x24]
cmp byte [ebp - 0x38], bl
mov esi, eax
je 0x40c916
push edi
call fcn.0043311a
pop ecx
cmp dword [ebp - 0x18], ebx
je 0x40c92c
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40c92c
push dword [ebp - 0x18]
call eax
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 1
call fcn.00401bc2
cmp dword [ebp - 0x1c], ebx
je 0x40c94b
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp eax, ebx
je 0x40c94b
push dword [ebp - 0x1c]
call eax
mov eax, esi
jmp 0x40c8e9