Function at 0x401d30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + 0x12828]
test ecx, ecx
jne 0x401d75
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
push eax
push 1
push 4
mov ecx, dword [ebp - 8]
add ecx, 0xc
push ecx
call fcn.0040ab99
add esp, 0x10
cmp eax, 1
jae 0x401d73
push 0x422610
mov ecx, dword [ebp - 8]
call fcn.00401450
jmp 0x401dd6
mov edx, dword [ebp - 8]
cmp dword [edx + 0x12840], 4
jae 0x401d8e
push str.Read_Error
mov ecx, dword [ebp - 8]
call fcn.00401450
push 4
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x1283c]
mov edx, dword [ebp - 8]
add ecx, dword [edx + 0x12844]
push ecx
mov eax, dword [ebp - 8]
add eax, 0xc
push eax
call fcn.0040a390
add esp, 0xc
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
mov dword [ecx + 0x12838], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x12844]
add edx, 4
mov eax, dword [ebp - 8]
mov dword [eax + 0x12844], edx
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0xc], 0
jne 0x401de4
jmp 0x401fbc
mov ecx, dword [ebp - 8]
call fcn.004018b0
mov ecx, dword [ebp - 8]
call fcn.00401550
mov dword [ebp - 0x18], 0
jmp 0x401e06
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0xfc4
jge 0x401e1b
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x18]
mov byte [eax + 0x18], 0x20
jmp 0x401dfd
mov dword [ebp - 0xc], 0xfc4
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0xc]
jae 0x401fab
mov ecx, dword [ebp - 8]
call fcn.00401900
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x100
jge 0x401eb6
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + 0x12828]
test ecx, ecx
jne 0x401e6f
mov edx, dword [ebp - 8]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00409fb7
add esp, 8
jmp 0x401e87
mov dl, byte [ebp - 0x10]
mov byte [ebp - 1], dl
lea eax, [ebp - 1]
push eax
mov ecx, dword [ebp - 8]
add ecx, 0x1282c
call fcn.00402210
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov dl, byte [ebp - 0x10]
mov byte [ecx + 0x18], dl
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
and ecx, 0xfff
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x401f79
mov ecx, dword [ebp - 8]
call fcn.00401b20
mov ecx, dword [ebp - 0xc]
sub ecx, eax
sub ecx, 1
and ecx, 0xfff
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x10]
sub edx, 0xfd
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], 0
jmp 0x401eed
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x20]
jge 0x401f79
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x1c]
and edx, 0xfff
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + edx + 0x18]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
movzx eax, byte [edx + 0x12828]
test eax, eax
jne 0x401f33
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409fb7
add esp, 8
jmp 0x401f4b
mov cl, byte [ebp - 0x10]
mov byte [ebp - 2], cl
lea edx, [ebp - 2]
push edx
mov ecx, dword [ebp - 8]
add ecx, 0x1282c
call fcn.00402210
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov cl, byte [ebp - 0x10]
mov byte [eax + 0x18], cl
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
and eax, 0xfff
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0x401ee4
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
cmp eax, dword [edx + 0x14]
jbe 0x401fa6
mov ecx, dword [ebp - 0x14]
push ecx
push str._12lu_r
call fcn.00409ebd
add esp, 8
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x14]
add eax, 0x400
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x14], eax
jmp 0x401e29
mov edx, dword [ebp - 0x14]
push edx
push str._12lu_n
call fcn.00409ebd
add esp, 8
mov esp, ebp
pop ebp
ret