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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
xor esi, esi
mov eax, edx
and dword [ebp - 4], esi
or ebx, 0xffffffff
push edi
mov edi, ecx
mov dword [ebp - 8], eax
test edi, edi
je 0x41fed6
test eax, eax
je 0x41fed6
push 0x60c
push esi
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41fd48
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 8]
push 2
push 0x68
call fcn.0042276e
add esp, 0x10
jmp 0x41fee9
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, 0x4000000
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 4], esi
ja 0x41febf
cmp ecx, eax
ja 0x41febf
lea eax, [ecx + 0x1fff]
and eax, 0xffffe000
mov dword [ebp - 0xc], eax
cmp eax, ecx
jae 0x41fd85
mov eax, ecx
mov dword [ebp - 0xc], ecx
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi], eax
test eax, eax
jne 0x41fdb3
push 0x180
push 2
push 0x66
call fcn.0042276e
add esp, 0xc
push 0xe
jmp 0x41fed8
push 0
lea ecx, [ebp - 4]
push ecx
push dword [ebp - 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41fde5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 8]
push 2
push 0x6a
call fcn.0042276e
add esp, 0x10
jmp 0x41fed9
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x1000
push eax
push dword [ebp - 4]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
jne 0x41feba
mov eax, dword [edi]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push 2
pop ecx
mul ecx
mov dword [ebp - 0x10], eax
test edx, edx
je 0x41fe30
and dword [edi], esi
push 0x196
push ecx
push 0x66
call fcn.0042276e
add esp, 0xc
mov esi, 0x216
jmp 0x41fea6
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [edi], ecx
test ecx, ecx
jne 0x41fe5e
push 0x19c
push 2
push 0x66
call fcn.0042276e
add esp, 0xc
push 0xe
pop esi
jmp 0x41fea6
mov eax, dword [ebp - 0x10]
shr eax, 1
push eax
push ecx
push dword [ebp - 4]
push dword [ebp - 8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 4], eax
cmp eax, 0x459
jne 0x41fe84
push 0xd
pop esi
jmp 0x41fe94
test eax, eax
jne 0x41fea6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x41fea6
push esi
push 0x1a9
push 2
push 0x6b
call fcn.0042276e
add esp, 0x10
push dword [ebp - 8]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x41fed9
shr dword [ebp - 4], 1
jmp 0x41fed9
push eax
push dword [ebp - 8]
push 1
push 0x69
call fcn.0042276e
add esp, 0x10
mov esi, 0x216
jmp 0x41fed9
push 0x57
pop esi
test ebx, ebx
je 0x41fee9
cmp ebx, 0xffffffff
je 0x41fee9
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x41ff00
mov ecx, dword [edi]
mov eax, dword [ebp - 4]
mov dword [edi + 0xc], ecx
mov dword [edi + 0x14], ecx
lea eax, [ecx + eax*2]
mov dword [edi + 4], eax
jmp 0x41ff07
mov ecx, edi
call fcn.0041fca1
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret