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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57328d
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x5c4680]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x34]
call fcn.00422640
lea eax, [ebp - 0x28]
push eax
call fcn.0041b420
add esp, 4
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x422482
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x28]
call fcn.00423320
jmp 0x42248e
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x28]
call fcn.00403c40
push 0
push 0x80
push 3
push 0
push 1
push bind
lea ecx, [ebp - 0x28]
call fcn.00403d90
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x4224e1
push 0
push str.Error_opening_file
mov ecx, dword [ebp - 0x34]
call fcn.004232c0
mov byte [ebp - 0x29], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00403c70
mov al, byte [ebp - 0x29]
jmp 0x422618
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x42251f
push 0
push str.File_is_empty
mov ecx, dword [ebp - 0x34]
call fcn.004232c0
mov byte [ebp - 0x2a], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00403c70
mov al, byte [ebp - 0x2a]
jmp 0x422618
cmp dword [ebp - 0x38], 0x400000
jbe 0x422551
push 0
push str.File_too_large
mov ecx, dword [ebp - 0x34]
call fcn.004232c0
mov byte [ebp - 0x2b], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00403c70
mov al, byte [ebp - 0x2b]
jmp 0x422618
mov dword [ebp - 0x44], 0
mov edx, dword [ebp - 0x38]
push edx
call fcn.0053143c
add esp, 4
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
push 0
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x38]
je 0x4225d7
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00531445
add esp, 4
mov ecx, dword [ebp - 0x34]
call fcn.00422640
push 0
push str.Could_not_read_file
mov ecx, dword [ebp - 0x34]
call fcn.004232c0
mov byte [ebp - 0x2c], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00403c70
mov al, byte [ebp - 0x2c]
jmp 0x422618
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov ecx, dword [ebp - 0x34]
call fcn.00422180
mov byte [ebp - 0x2d], al
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
push ecx
call fcn.00531445
add esp, 4
mov dl, byte [ebp - 0x2d]
mov byte [ebp - 0x2e], dl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00403c70
mov al, byte [ebp - 0x2e]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005313f0
mov esp, ebp
pop ebp
ret 8