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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
xor eax, eax
push esi
xor esi, esi
push edi
push 0x100000
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
call fcn.004261ca
mov edi, eax
add esp, 4
mov dword [ebp - 8], edi
cmp edi, esi
jne 0x41a886
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x100000
push esi
push edi
call fcn.00427b00
mov eax, dword [ebp + 8]
add esp, 0xc
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41a907
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0x20000000
je 0x41a8e5
cmp eax, esi
jle 0x41a8d1
and eax, 0xffff
or eax, 0xa0070000
push edi
mov esi, eax
call fcn.00427598
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, esi
jle 0x41a8d1
and eax, 0xffff
or eax, 0x80070000
push edi
mov esi, eax
call fcn.00427598
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x1c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x41a95b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0x20000000
je 0x41a93f
cmp eax, esi
jg 0x41a92e
mov esi, eax
jmp 0x41aa5a
and eax, 0xffff
or eax, 0xa0070000
mov esi, eax
jmp 0x41aa5a
cmp eax, esi
jg 0x41a94a
mov esi, eax
jmp 0x41aa5a
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x41aa5a
cmp dword [ebp - 0x18], esi
jne 0x41aa9b
cmp dword [ebp - 0x1c], 0x1000000
ja 0x41aa9b
push esi
lea edx, [ebp - 0x10]
push edx
push 0x1000
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call edi
test eax, eax
jne 0x41a9ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0x20000000
je 0x41a9a1
test eax, eax
jg 0x41a92e
mov esi, eax
jmp 0x41aa5a
test eax, eax
jg 0x41a94a
mov esi, eax
jmp 0x41aa5a
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0xc]
push eax
push ecx
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x40]
call fcn.00418b70
mov esi, eax
add esp, 8
test esi, esi
jl 0x41aa5a
mov edx, dword [ebp - 0xc]
push 0
push 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 0xc
push esi
push ebx
call edi
test eax, eax
je 0x41a989
cmp word [esi + 6], 2
je 0x41a9fc
mov esi, 0x8007000d
jmp 0x41aa5a
mov ecx, dword [ebp - 0xc]
push 0
push 0
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi]
push 0
lea edx, [ebp - 0x10]
push edx
add eax, 0xc
push eax
push esi
push ebx
call edi
test eax, eax
je 0x41a989
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], 6
mov edx, dword [esi]
push edx
add esi, 8
push esi
call fcn.0041d7c0
mov edi, eax
add esp, 8
test edi, edi
jne 0x41aa7a
mov esi, 0x8007000d
test edi, edi
je 0x41aa5a
push edi
call fcn.0041d8f0
add esp, 4
test ebx, ebx
je 0x41aa65
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 8]
push edi
call fcn.00427598
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x1000
lea eax, [ebp - 0x28]
push eax
push 0x418ce0
push edi
call fcn.0041a4b0
mov esi, eax
add esp, 0x10
test esi, esi
jl 0x41aa4d
xor esi, esi
jmp 0x41aa4d
mov esi, 0x800700df
jmp 0x41aa5a