Function at 0x411042
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
je 0x411358
cmp dword [ebp + 0x10], ebx
je 0x411358
push ebx
push 0x80
push 4
push ebx
push 1
push 0x80000000
mov ecx, 0x47a560
call fcn.0041ab9e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x411090
push 0xfffffffffffffffe
jmp 0x411355
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push dword [0x47b024]
push eax
call edi
lea eax, [ebp - 8]
push ebx
push eax
push 0x3c
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 1
push ebx
push ebx
push dword [ebp + 8]
call edi
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x38]
cmp eax, ebx
mov dword [ebp - 0x14], eax
mov dword [esi + 0x38], ebx
je 0x41127c
push 0xc
call fcn.0042200e
cmp eax, ebx
pop ecx
mov dword [esi + 0x38], eax
jne 0x4110f0
mov ecx, 0x47a7fc
call fcn.0041ab9e
push eax
call fcn.0041b6d2
pop ecx
mov eax, dword [esi + 0x38]
mov ecx, dword [ebp - 0x14]
push ebx
mov dword [eax], ecx
mov eax, dword [esi + 0x38]
mov dword [eax + 8], ebx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push 4
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x38]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0x10]
cmp eax, ebx
jbe 0x41127c
mov dword [ebp - 0x14], eax
imul eax, eax, 0x1c
add eax, 4
push eax
call fcn.0042200e
cmp eax, ebx
pop ecx
je 0x41117d
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
add eax, 4
mov dword [ebp - 0x18], eax
mov edx, eax
lea eax, [ecx - 1]
mov dword [ebp - 0xc], edx
cmp eax, ebx
jl 0x411178
add edx, 0x10
inc eax
mov dword [ebp - 4], edx
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
call fcn.00419c64
mov ecx, dword [ebp - 4]
call fcn.00419c64
add dword [ebp - 0xc], 0x1c
add dword [ebp - 4], 0x1c
dec dword [ebp - 0x14]
jne 0x41115b
mov eax, dword [ebp - 0x18]
jmp 0x41117f
xor eax, eax
mov ecx, dword [esi + 0x38]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x38]
cmp dword [eax + 8], ebx
jne 0x41119e
mov ecx, 0x47a7fc
call fcn.0041ab9e
push eax
call fcn.0041b6d2
pop ecx
cmp dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
jbe 0x41127c
mov dword [ebp - 0xc], ebx
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 4]
push 4
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], ebx
jbe 0x4111ec
push dword [ebp - 4]
push 1
push ebx
push ebx
push dword [ebp + 8]
call edi
push eax
mov ecx, 0x47a560
call fcn.0041ab9e
push eax
mov eax, dword [esi + 0x38]
mov ecx, dword [eax + 8]
add ecx, dword [ebp - 0xc]
call fcn.0041a96d
push 1
push ebx
push dword [ebp - 4]
push dword [ebp + 8]
call edi
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 4]
push 4
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x38]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
push ebx
mov eax, dword [eax + 8]
mov dword [eax + edx + 0xc], ecx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push 4
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], ebx
jbe 0x41125e
push dword [ebp - 4]
push 1
push ebx
push ebx
push dword [ebp + 8]
call edi
push eax
mov ecx, 0x47a560
call fcn.0041ab9e
mov ecx, dword [ebp - 0xc]
push eax
mov eax, dword [esi + 0x38]
mov eax, dword [eax + 8]
lea ecx, [eax + ecx + 0x10]
call fcn.0041a96d
push 1
push ebx
push dword [ebp - 4]
push dword [ebp + 8]
call edi
inc dword [ebp - 0x14]
add dword [ebp - 0xc], 0x1c
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
jb 0x4111ad
push 1
push ebx
push ebx
push dword [ebp + 8]
call edi
sub eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, dword [esi + 0x2c]
inc eax
push eax
call fcn.0042200e
mov edi, eax
pop ecx
cmp edi, ebx
jne 0x4112af
mov ecx, 0x47a7fc
call fcn.0041ab9e
push eax
call fcn.0041b6d2
pop ecx
lea eax, [ebp - 8]
push ebx
push eax
push dword [esi + 0x2c]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp + 0xc]
push edi
mov byte [edi + eax], bl
call fcn.00419db1
push edi
call fcn.0042201c
pop ecx
push dword [ebp + 0x10]
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [0x47b0b0]
pop edi
cmp eax, ebx
je 0x4112f6
push eax
call fcn.0042201c
pop ecx
mov eax, dword [esi + 0x30]
shl eax, 2
push eax
call fcn.0042200e
cmp eax, ebx
pop ecx
mov dword [0x47b0b0], eax
jne 0x41131d
mov ecx, 0x47a7fc
call fcn.0041ab9e
push eax
call fcn.0041b6d2
pop ecx
lea eax, [ebp - 8]
push ebx
push eax
mov eax, dword [esi + 0x30]
shl eax, 2
push eax
push dword [0x47b0b0]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x427ee4]
push dword [ebp + 8]
mov dword [0x47b044], eax
mov eax, dword [esi + 0x30]
mov dword [0x47a19c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop eax
jmp 0x41135b
or eax, 0xffffffff
pop esi
pop ebx
leave
ret 0x10