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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
mov eax, dword [0x406018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
mov esi, ecx
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x42c], edi
cmp edi, 0xffffffff
jne 0x402fc6
push esi
push str.Terminal_failure:_unable_to_open_file___s__for_read._n
mov eax, pe_nt_image_headers32
mov ebx, 0x4063c8
call section..text
add esp, 8
push 0x4065c8
mov edi, ebx
call fcn.00401db0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040359e
mov esp, ebp
pop ebp
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
mov dword [ebp - 0x420], esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov ebx, eax
lea eax, [esi + esi]
add esp, 4
push eax
mov dword [ebp - 0x428], ebx
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
xor ecx, ecx
push ecx
mov esi, eax
lea edx, [ebp - 0x420]
push edx
mov word [esi], cx
mov eax, dword [ebp - 0x420]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403191
xor edi, edi
mov word [ebp - 0x41c], 0
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x420], edi
jbe 0x40318b
lea esp, [esp]
mov al, byte [edi + ebx]
mov byte [ebp - 0x41c], al
mov byte [ebp - 0x41b], 0
cmp al, 0xd
je 0x403098
cmp byte [edi + ebx + 1], 0xa
je 0x403098
push 2
lea ecx, [ebp - 0x430]
push ecx
push 2
lea edx, [ebp - 0x41c]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x430]
push eax
mov eax, dword [ebp - 0x420]
add eax, eax
mov edi, esi
call fcn.00401ed0
mov edi, dword [ebp - 0x424]
jmp 0x403172
cmp word [esi], 0x5b
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
jne 0x403106
push esi
call ebx
cmp word [esi + eax*2 - 2], 0x5d
jne 0x403106
push esi
mov edi, 1
call ebx
dec eax
cmp eax, edi
jle 0x4030d9
lea ebx, [ebp - 0x210]
mov cx, word [esi + edi*2]
mov word [ebx], cx
push esi
inc edi
add ebx, 2
call dword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
cmp edi, eax
jl 0x4030c2
xor edx, edx
mov word [ebp + edi*2 - 0x212], dx
lea edx, [ebp - 0x210]
mov eax, 0x82
lea ecx, [ebp - 0x418]
call fcn.00401070
mov edi, dword [ebp - 0x424]
xor eax, eax
mov word [esi], ax
jmp 0x403171
cmp word [esi], 0x2f
je 0x40316c
cmp word [esi + 2], 0x2f
je 0x40316c
push 0x618
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov edi, eax
add esp, 4
lea edx, [ebp - 0x418]
mov eax, 0x82
mov ecx, edi
call fcn.00401070
push edi
call fcn.004031e0
add esp, 4
lea ecx, [edi + 0x208]
push ecx
call ebx
test eax, eax
jle 0x40315f
lea edx, [edi + 0x410]
push edx
call ebx
test eax, eax
jle 0x40315f
mov eax, edi
call fcn.004032d0
mov edi, dword [ebp - 0x424]
xor eax, eax
mov word [esi], ax
jmp 0x403171
xor ecx, ecx
mov word [esi], cx
inc edi
mov ebx, dword [ebp - 0x428]
inc edi
mov dword [ebp - 0x424], edi
cmp edi, dword [ebp - 0x420]
jb 0x403040
mov edi, dword [ebp - 0x42c]
push ebx
mov ebx, dword [sym.imp.MSVCR100.dll_free]
call ebx
add esp, 4
push esi
call ebx
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x40a958]
sub ecx, dword [0x40a954]
mov eax, 0xa80a80a9
imul ecx
add edx, ecx
mov ecx, dword [ebp - 4]
sar edx, 0xa
pop edi
mov eax, edx
shr eax, 0x1f
pop esi
xor ecx, ebp
add eax, edx
pop ebx
call fcn.0040359e
mov esp, ebp
pop ebp
ret