Function at 0x401880
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x423008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
push 0x41f9dc
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
mov esi, ecx
call fcn.00408404
mov edi, dword [ebp - 0x1c]
add esp, 0xc
test edi, edi
jne 0x4018cb
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004047d8
mov esp, ebp
pop ebp
ret 4
push ebx
push edi
push 1
lea eax, [ebp - 0x18]
push 0x12
push eax
call fcn.0040ad3c
add esp, 0x10
test eax, eax
je 0x401a74
cmp byte [ebp - 0x17], 1
ja 0x401a74
movzx eax, byte [ebp - 0x16]
sub eax, 1
je 0x401906
sub eax, 1
je 0x401906
sub eax, 1
jne 0x401a74
cmp byte [ebp - 8], 0x20
jne 0x401a74
movzx eax, word [ebp - 0xc]
mov bl, byte [ebp - 7]
movzx ecx, byte [ebp - 0x11]
mov dword [esi + 4], eax
add ecx, 7
movzx eax, word [ebp - 0xa]
mov dword [esi + 8], eax
mov al, bl
shr al, 6
and al, 1
shr ecx, 3
mov byte [ebp - 0x1d], al
movzx eax, word [ebp - 0x13]
imul ecx, eax
movzx eax, byte [ebp - 0x18]
add eax, 0x12
shr bl, 5
push 0
and bl, 1
add eax, ecx
push eax
push edi
call fcn.00408889
mov eax, dword [esi + 8]
xor ecx, ecx
imul eax, dword [esi + 4]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00404b67
mov ecx, dword [esi + 8]
imul ecx, dword [esi + 4]
push edi
push 1
mov dword [esi], eax
shl ecx, 2
push ecx
push eax
call fcn.0040ad3c
add esp, 0x20
test eax, eax
je 0x401a74
test bl, bl
je 0x401a07
mov ecx, dword [esi + 8]
xor ebx, ebx
mov eax, ecx
mov dword [ebp - 0x24], ebx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x2c], eax
test eax, eax
jle 0x401a07
nop dword [eax]
mov edx, dword [esi + 4]
mov eax, edx
imul eax, ebx
mov dword [ebp - 0x28], ecx
mov ecx, dword [esi]
mov dword [ebp - 0x1c], 0
lea edi, [ecx + eax*4]
mov eax, dword [ebp - 0x28]
sub eax, ebx
dec eax
imul eax, edx
lea ebx, [ecx + eax*4]
test edx, edx
jle 0x4019f8
mov eax, dword [edi]
lea edi, [edi + 4]
mov ecx, dword [ebx]
lea ebx, [ebx + 4]
mov dword [edi - 4], ecx
mov dword [ebx - 4], eax
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, dword [esi + 4]
jl 0x4019d7
mov ecx, dword [esi + 8]
jmp 0x4019fb
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x24]
inc ebx
mov dword [ebp - 0x24], ebx
cmp ebx, dword [ebp - 0x2c]
jl 0x4019b0
cmp byte [ebp - 0x1d], 0
je 0x401a5f
mov eax, dword [esi + 4]
mov edi, dword [esi]
cdq
sub eax, edx
xor edx, edx
mov ebx, eax
mov dword [ebp - 0x24], edx
sar ebx, 1
cmp dword [esi + 8], edx
jle 0x401a5f
xor ecx, ecx
test ebx, ebx
jle 0x401a50
nop dword [eax]
mov edx, dword [esi + 4]
mov eax, dword [edi + ecx*4]
sub edx, ecx
mov edx, dword [edi + edx*4 - 4]
mov dword [edi + ecx*4], edx
mov edx, dword [esi + 4]
sub edx, ecx
inc ecx
mov dword [edi + edx*4 - 4], eax
cmp ecx, ebx
jl 0x401a30
mov edx, dword [ebp - 0x24]
mov eax, dword [esi + 4]
inc edx
mov dword [ebp - 0x24], edx
lea edi, [edi + eax*4]
cmp edx, dword [esi + 8]
jl 0x401a23
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004047d8
mov esp, ebp
pop ebp
ret 4
push edi
call fcn.00408570
mov eax, dword [esi]
add esp, 4
test eax, eax
je 0x401a8e
push 4
push eax
call fcn.00404b59
add esp, 8
mov ecx, dword [ebp - 4]
xor al, al
pop ebx
pop edi
mov dword [esi], 0
xor ecx, ebp
mov dword [esi + 8], 0
mov dword [esi + 4], 0
pop esi
call fcn.004047d8
mov esp, ebp
pop ebp
ret 4