Function at 0x411fb0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push 0x4218f8
call sub.kernel32.dll_EnterCriticalSection_1
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], 6
cmp dword [ebp - 0xc], 0x28
jb 0x4122f9
push 0
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122f9
cmp dword [ebp - 0x14], 0x4653414b
jne 0x4122f9
push 0
lea eax, [ebp - 0x20]
push eax
push 0x10
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122f9
lea edx, [ebp - 0x40]
mov eax, dword [0x420734]
call fcn.00404a38
test al, al
jne 0x4122f9
push 0
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122f9
cmp word [ebp - 0x26], 1
jae 0x412071
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], 7
jmp 0x4122f9
push 0
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122f9
push 0
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122f9
mov eax, dword [ebp - 0x10]
xor dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
call fcn.00411ee8
test al, al
je 0x4120ca
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], 9
push 0
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122f9
push 0
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122f9
mov eax, dword [ebp - 0x18]
shl eax, 2
lea eax, [eax + eax*4]
add eax, 0x28
imul edx, dword [ebp - 0x1c], 0x1a
add eax, edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0xc], 6
jne 0x412135
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], 8
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
jb 0x4122f9
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
call fcn.00412508
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
call fcn.00412430
cmp dword [ebp - 0x18], 0
je 0x412249
push 0
lea eax, [ebp - 0x20]
push eax
push 0x14
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x412249
dec dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov edx, dword [ebp - 0x18]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x24], 4
mov eax, dword [ebp - 4]
mov al, byte [eax + 0xc]
and al, 1
or byte [ebp - 0x43], al
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x1c], eax
cmp byte [ebp - 0x44], 1
je 0x4121c6
shr dword [ebp - 0x4c], 1
xor eax, eax
mov al, byte [ebp - 0x43]
shr eax, 3
push eax
mov eax, dword [ebp - 0x4c]
pop edx
mov ecx, edx
xor edx, edx
div ecx
sub eax, 7
mov edx, dword [ebp - 0x2c]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0xc], eax
mov dl, byte [ebp - 0x43]
mov eax, dword [ebp - 0x2c]
call fcn.004117dc
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x20], eax
xor eax, eax
mov al, byte [ebp - 0x43]
shr eax, 3
lea eax, [eax + eax*2]
add dword [ebp - 0x50], eax
cmp byte [ebp - 0x44], 1
je 0x41222d
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x50]
add eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x14], eax
jmp 0x41223f
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x14], eax
cmp dword [ebp - 0x18], 0
jne 0x412167
cmp dword [ebp - 0x18], 0
jne 0x4122f9
cmp dword [ebp - 0x1c], 0
jbe 0x4122d8
push 0
lea eax, [ebp - 0x20]
push eax
push 0x1a
lea eax, [ebp - 0x6e]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4122d8
dec dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
mov edx, dword [ebp - 0x1c]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x30], eax
mov cl, byte [ebp - 0x58]
mov dl, byte [ebp - 0x59]
mov eax, dword [ebp - 0x30]
call fcn.004118a4
mov cl, byte [ebp - 0x55]
mov dl, byte [ebp - 0x5a]
mov eax, dword [ebp - 0x30]
call fcn.00411918
mov cl, byte [ebp - 0x56]
mov dl, byte [ebp - 0x57]
mov eax, dword [ebp - 0x30]
call fcn.00411a00
mov eax, dword [ebp - 0x66]
push eax
mov eax, dword [ebp - 0x62]
push eax
mov eax, dword [ebp - 0x5e]
push eax
mov edx, dword [ebp - 0x6e]
mov eax, dword [ebp - 4]
call fcn.00412300
mov edx, eax
mov ecx, dword [ebp - 0x6a]
mov eax, dword [ebp - 0x30]
call fcn.004119a8
cmp dword [ebp - 0x1c], 0
ja 0x412259
cmp dword [ebp - 0x1c], 0
jne 0x4122f9
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 4]
mov dword [edx + 0x10], eax
push 0x4218f8
call sub.kernel32.dll_LeaveCriticalSection_1
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret