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

Disassembly:
sub esp, 0xcc
mov eax, dword [0x50a360]
xor eax, esp
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xd4]
push ebp
push esi
push edi
mov edi, dword [esp + 0xdc]
xor ebp, ebp
push ebp
push ebp
push 3
push ebp
push 1
push SysReAllocStringLen
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, 0xffffffff
jne 0x4210b0
push 0x4ef7cc
mov ecx, edi
call fcn.00402560
mov eax, edi
jmp 0x421296
xor eax, eax
push ebx
push 0x48
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x40]
push ebp
push eax
mov dword [esp + 0x38], ebp
call fcn.00494750
xor eax, eax
push 0x40
lea edx, [esp + 0xa6]
xor ecx, ecx
push ebp
push edx
mov byte [esp + 0x9c], 0
mov dword [esp + 0x9d], eax
mov dword [esp + 0xa1], eax
mov dword [esp + 0xa5], eax
mov word [esp + 0xa9], ax
mov byte [esp + 0xab], al
mov word [esp + 0xac], cx
call fcn.00494750
lea eax, [esp + 0x44]
push eax
call fcn.00445e10
add esp, 0x1c
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push 0xbc2000
call fcn.00464376
mov ebx, eax
add esp, 4
cmp ebx, ebp
jne 0x421157
push 0x4ef7cc
mov ecx, edi
call fcn.00402560
mov eax, edi
jmp 0x421295
mov eax, dword [esp + 0xf0]
mov ecx, dword [esp + 0xf4]
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov edx, eax
or edx, ecx
je 0x421177
mov edi, eax
mov ebp, ecx
mov eax, dword [esp + 0xe8]
mov ecx, dword [esp + 0xec]
mov edx, eax
or edx, ecx
je 0x4211b9
push 0
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x2c]
push ecx
push eax
push esi
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4212d6
sub edi, dword [esp + 0xe8]
sbb ebp, dword [esp + 0xec]
mov dword [esp + 0x18], 0
test ebp, ebp
jl 0x42122f
jg 0x4211d0
test edi, edi
jbe 0x42122f
jmp 0x4211d0
test ebp, ebp
jl 0x4211e5
jg 0x4211de
cmp edi, 0xbc2000
jb 0x4211e5
mov esi, 0xbc2000
jmp 0x4211e7
mov esi, edi
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x1c]
push edx
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4212b0
cmp dword [esp + 0x18], esi
jne 0x4212b0
push esi
lea ecx, [esp + 0x30]
push ebx
push ecx
call fcn.004465b0
add esp, 0xc
sub edi, esi
sbb ebp, 0
test ebp, ebp
jg 0x4211de
jl 0x42122b
test edi, edi
ja 0x4211d0
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x88]
push eax
call fcn.00446650
push ebx
call fcn.0046436b
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
lea edi, [esp + 0x94]
lea ebx, [ebx]
movzx ecx, byte [esp + esi + 0x84]
push ecx
push str._02X
push edi
call fcn.00496035
inc esi
add esp, 0xc
add edi, 4
cmp esi, 0x10
jl 0x421260
lea edx, [esp + 0x94]
push edx
mov esi, dword [esp + 0x14]
mov ecx, esi
call fcn.00402560
mov eax, esi
pop ebx
mov ecx, dword [esp + 0xd4]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004945a7
add esp, 0xcc
ret 0x18
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.0046436b
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.00446650
add esp, 0xc
push 0x4ef7cc
jmp 0x421288