Function at 0x401060
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x2dc
mov eax, dword [0x42610c]
xor eax, esp
mov dword [esp + 0x2d8], eax
mov eax, dword [esp + 0x2e4]
mov ecx, dword [esp + 0x2e0]
mov edx, dword [esp + 0x2ec]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2f0]
push edi
mov edi, dword [esp + 0x2ec]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0
test ecx, ecx
jne 0x4010c8
xor eax, eax
pop edi
mov ecx, dword [esp + 0x2d8]
xor ecx, esp
call fcn.00411e16
add esp, 0x2dc
ret
mov eax, ecx
push esi
lea esi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4010d0
sub eax, esi
je 0x4010f8
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401111
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0x2d8]
xor ecx, esp
call fcn.00411e16
add esp, 0x2dc
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
push 0
push 0
push 0
push esi
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x40
lea edx, [esp + 0x2a0]
push edx
push esi
call ebp
test eax, eax
je 0x4013c6
cmp dword [esp + 0x10], 0x40
jne 0x4013c6
mov eax, dword [esp + 0x2d0]
push 0
push 0
push eax
push esi
call ebx
push 0
lea ecx, [esp + 0x14]
push ecx
push 0xf8
lea edx, [esp + 0x78]
push edx
push esi
call ebp
test eax, eax
je 0x4013c6
cmp dword [esp + 0x10], 0xf8
jne 0x4013c6
mov eax, dword [esp + 0x84]
test edi, edi
je 0x4011a8
mov ecx, eax
xor edx, edx
and ecx, 0x10b
cmp ecx, 0x10b
sete dl
mov dword [edi], edx
xor ecx, ecx
and eax, 0x20b
cmp eax, 0x20b
sete cl
mov edi, ecx
test edi, edi
je 0x4011f9
mov edx, dword [esp + 0x2d0]
push 0
push 0
push edx
push esi
call ebx
push 0
lea eax, [esp + 0x14]
push eax
push 0x108
lea ecx, [esp + 0x170]
push ecx
push esi
call ebp
test eax, eax
je 0x4013c6
cmp dword [esp + 0x10], 0x108
jne 0x4013c6
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40121b
mov edx, dword [esp + 0x82]
xor ecx, ecx
and edx, 0x2000
cmp edx, 0x2000
sete cl
mov dword [eax], ecx
test edi, edi
je 0x401231
xor edx, edx
cmp dword [esp + 0x260], edx
setne dl
mov dword [esp + 0x14], edx
jmp 0x401241
xor eax, eax
cmp dword [esp + 0x158], eax
setne al
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
je 0x4013b9
mov ebx, dword [esp + 0x25c]
test edi, edi
jne 0x40125e
mov ebx, dword [esp + 0x154]
push 0x48
lea ecx, [esp + 0x28]
push 0
push ecx
call fcn.004122b0
xor eax, eax
add esp, 0xc
mov dword [esp + 0x2d4], eax
mov dword [esp + 0x2d8], eax
mov dword [esp + 0x2dc], eax
mov dword [esp + 0x2e0], eax
mov dword [esp + 0x2e4], eax
mov eax, dword [esp + 0x2d0]
test edi, edi
je 0x4012a6
add eax, 0x108
jmp 0x4012ab
add eax, 0xf8
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push esi
call edi
xor edx, edx
mov dword [esp + 0x18], 0
cmp dx, word [esp + 0x72]
jae 0x40138b
mov edi, edi
push 0
lea eax, [esp + 0x14]
push eax
push 0x28
lea ecx, [esp + 0x278]
push ecx
push esi
call ebp
test eax, eax
je 0x4013c6
cmp dword [esp + 0x10], 0x28
jne 0x4013c6
mov eax, dword [esp + 0x278]
cmp ebx, eax
jb 0x40130f
mov edx, dword [esp + 0x274]
add edx, eax
cmp ebx, edx
jb 0x401323
mov eax, dword [esp + 0x18]
movzx ecx, word [esp + 0x72]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x4012d0
jmp 0x40138b
mov edx, dword [esp + 0x280]
push 0
sub edx, eax
push 0
add edx, ebx
push edx
push esi
call edi
push 0
lea eax, [esp + 0x14]
push eax
push 0x48
lea ecx, [esp + 0x30]
push ecx
push esi
call ebp
test eax, eax
je 0x4013c6
cmp dword [esp + 0x10], 0x48
jne 0x4013c6
mov edx, dword [esp + 0x2c]
sub edx, dword [esp + 0x278]
push 0
add edx, dword [esp + 0x284]
push 0
push edx
push esi
call edi
push 0
lea eax, [esp + 0x14]
push eax
push 0x14
lea ecx, [esp + 0x2e0]
push ecx
push esi
call ebp
test eax, eax
je 0x4013c6
cmp dword [esp + 0x10], 0x14
jne 0x4013c6
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4013a4
mov edx, dword [esp + 0x34]
xor ecx, ecx
and dl, 1
cmp dl, 1
sete cl
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4013b9
movsx edx, byte [esp + 0x2e5]
sub edx, 0x30
mov dword [eax], edx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
jmp 0x4013cf
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x2e8]
pop ebp
pop ebx
pop esi
pop edi
xor ecx, esp
call fcn.00411e16
add esp, 0x2dc
ret