Function at 0x41f910
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push edi
mov edi, dword [esp + 0x14]
test edi, edi
mov esi, ecx
je 0x41fbb5
cmp byte [edi], 0
je 0x41fbb5
mov eax, dword [esi]
call dword [eax + 8]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41f936
sub eax, edx
push eax
push edi
lea ecx, [esi + 4]
call fcn.004023a0
mov al, byte [esp + 0x18]
mov byte [esi + 0x20], al
neg al
push 0
push 0x8000005
push 3
push 0
push 3
sbb eax, eax
and eax, 0xc0000000
add eax, 0xc0000000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x24], eax
jne 0x41f99c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.File_s__WinErr_d
push 3
call fcn.0041d220
add esp, 0x10
pop edi
xor al, al
pop esi
add esp, 8
ret 8
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x28
lea edx, [esi + 0x28]
push edx
push eax
call ebp
test eax, eax
je 0x41fb94
cmp dword [esp + 0x18], 0x28
jne 0x41fb94
mov al, byte [esi + 0x20]
test al, al
je 0x41f9ee
mov eax, dword [esi + 0x30]
test eax, eax
je 0x41f9ee
push 0x45675a
push 7
call fcn.0041d220
add esp, 8
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x24]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x41fa28
mov edx, dword [esi + 0x34]
push edx
push edi
push str.file:__s__point_d
push 6
call fcn.0041d220
add esp, 0x10
pop ebx
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
mov edx, dword [esi + 0x24]
push 0
lea eax, [esp + 0x20]
push eax
push 0x60000
lea ecx, [esi + 0x50]
push ecx
push edx
call ebp
test eax, eax
je 0x41fb72
cmp dword [esp + 0x1c], 0x60000
jne 0x41fb72
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x24]
push 0
push 0
push eax
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x41fa6c
mov edx, dword [esi + 0x38]
jmp 0x41fa0b
mov eax, dword [esi + 0x3c]
lea ebx, [esi + 0x60050]
push eax
mov ecx, ebx
call fcn.0041f720
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x60054]
push 0
lea edx, [esp + 0x20]
push edx
lea eax, [eax + eax*2]
shl eax, 2
push eax
push ecx
mov ecx, dword [esi + 0x24]
push ecx
call ebp
test eax, eax
je 0x41fb72
mov eax, dword [esi + 0x3c]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x1c]
shl edx, 2
cmp eax, edx
jne 0x41fb72
mov ecx, ebx
xor edi, edi
call fcn.0041d8a0
test eax, eax
jbe 0x41fb25
xor ebp, ebp
jmp 0x41fad0
mov eax, dword [esi + 0x60054]
mov ecx, dword [eax + ebp]
mov edx, dword [esi + 0x44]
add eax, ebp
cmp ecx, edx
jb 0x41fb57
mov edx, dword [eax + 8]
shr edx, 0x1f
test dl, 1
jne 0x41fb16
mov eax, dword [eax + 4]
push eax
call fcn.0041d290
add esp, 4
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
lea ecx, [esi + 0x60060]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
call fcn.0041f3d0
mov ecx, ebx
inc edi
add ebp, 0xc
call fcn.0041d8a0
cmp edi, eax
jb 0x41fad0
mov al, byte [esi + 0x20]
test al, al
jne 0x41fb4b
mov ecx, esi
mov dword [esi + 0x30], 1
mov dword [esi + 0x2c], 0x10001
call fcn.0041d2b0
mov eax, dword [esi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
pop ebx
pop ebp
pop edi
mov al, 1
pop esi
add esp, 8
ret 8
push 0x45675a
push 2
call fcn.0041d220
add esp, 8
pop ebx
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinErr_d
push 4
call fcn.0041d220
add esp, 0xc
pop ebx
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinErr_d
push 4
call fcn.0041d220
add esp, 0xc
pop ebp
pop edi
xor al, al
pop esi
add esp, 8
ret 8
push 0x45675a
push 0xa
call fcn.0041d220
add esp, 8
pop edi
xor al, al
pop esi
add esp, 8
ret 8