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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
or edi, 0xffffffff
mov dword [ebp - 0xc], 0xffffffff
xor ebx, ebx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], edi
cmp eax, 0x10000
jg 0x4151e0
cmp eax, 1
jl 0x4151e0
push ebx
push ebx
push 3
push ebx
push 3
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, edi
je 0x4151f5
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
test eax, eax
je 0x4151f5
mov ebx, dword [ebp - 0x24]
mov eax, ebx
mov esi, dword [ebp - 0x20]
or eax, esi
je 0x4151f3
push 0x10000
call fcn.004f1588
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
je 0x4151ef
and edi, dword [ebp - 0x10]
cmp edi, 0xffffffff
jne 0x4150d8
mov edi, ebx
mov dword [ebp - 0x10], esi
add ebx, 0xffff0000
adc esi, 0xffffffff
jmp 0x4150f6
mov ecx, dword [ebp + 0x10]
lea eax, [ecx - 1]
cdq
mov edi, eax
mov eax, edx
add edi, ebx
adc eax, esi
mov dword [ebp - 0x10], eax
mov eax, 0x10001
sub eax, ecx
cdq
sub ebx, eax
sbb esi, edx
mov dword [ebp - 8], esi
mov dword [ebp - 0x18], edi
test esi, esi
jg 0x415117
jl 0x415106
test ebx, ebx
jae 0x415117
xorps xmm0, xmm0
movlpd qword [ebp - 0x2c], xmm0
mov esi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 8], esi
push 0
lea eax, [ebp - 0x34]
push eax
push esi
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
test eax, eax
je 0x4151ea
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, edi
sub eax, ebx
push eax
push dword [ebp - 4]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4151ea
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x10]
sub edi, ecx
js 0x4151be
nop dword [eax]
mov edx, dword [ebp - 4]
mov esi, ecx
mov eax, dword [ebp + 0xc]
add edx, edi
sub esi, 4
jb 0x415181
nop
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x415186
add edx, 4
add eax, 4
sub esi, 4
jae 0x415170
cmp esi, 0xfffffffc
je 0x4151cc
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x4151b3
cmp esi, 0xfffffffd
je 0x4151cc
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x4151b3
cmp esi, 0xfffffffe
je 0x4151cc
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x4151b3
cmp esi, 0xffffffff
je 0x4151cc
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
je 0x4151cc
sub edi, 1
mov ecx, dword [ebp + 0x10]
jns 0x415160
mov esi, dword [ebp - 8]
mov eax, ebx
or eax, esi
je 0x4151ea
mov edi, dword [ebp - 0x18]
jmp 0x4150c0
mov eax, edi
cdq
mov edi, eax
mov eax, edx
add edi, ebx
mov ebx, dword [ebp - 4]
adc eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
jmp 0x4151f8
push 0x57
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x4151f5
mov ebx, dword [ebp - 4]
jmp 0x4151f5
mov ebx, eax
jmp 0x4151f5
xor ebx, ebx
or edi, 0xffffffff
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0xc]
cmp eax, 0xffffffff
je 0x41520f
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
test ebx, ebx
je 0x41521c
push ebx
call fcn.004ec0b7
add esp, 4
push esi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
mov edx, dword [ebp - 0x1c]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret