Function at 0x4208a0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov ecx, dword [esp + 0xc]
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
xor ebx, ebx
mov edi, ecx
cmp ebp, ebx
mov dword [esp + 0x10], edi
je 0x420ad6
cmp byte [ebp + 0x5c], 0x72
jne 0x420ad6
mov eax, dword [ebp + 0x38]
cmp eax, 0xfffffffd
je 0x420acd
cmp eax, 0xffffffff
je 0x420acd
cmp eax, 1
jne 0x4208e9
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov esi, dword [esp + 0x20]
mov dword [esp + 0x18], ecx
cmp esi, ebx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x10], esi
je 0x420aaa
mov eax, dword [ebp + 0x58]
cmp eax, ebx
mov eax, dword [ebp + 4]
jne 0x420a06
cmp eax, ebx
jne 0x420954
cmp dword [ebp + 0x3c], ebx
jne 0x420954
mov dword [0x4374a4], ebx
mov eax, dword [ebp + 0x40]
mov ecx, dword [ebp + 0x44]
push eax
push 0x4000
push 1
push ecx
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp eax, ebx
mov dword [ebp + 4], eax
jne 0x42094e
mov edx, dword [ebp + 0x40]
mov dword [ebp + 0x3c], 1
test byte [edx + 0xc], 0x20
jne 0x420a9d
mov eax, dword [ebp + 0x44]
mov dword [ebp], eax
push ebx
push ebp
call fcn.00420e30
add esp, 8
cmp eax, 1
mov dword [ebp + 0x38], eax
jne 0x4209e0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x4c]
sub ecx, edi
push ecx
push edi
push edx
call fcn.004225f0
add esp, 0xc
mov dword [ebp + 0x4c], eax
mov eax, dword [ebp + 0xc]
push ebp
mov dword [esp + 0x14], eax
call fcn.00420bb0
mov ecx, dword [ebp + 0x4c]
add esp, 4
cmp eax, ecx
je 0x42099c
mov dword [ebp + 0x38], 0xfffffffd
jmp 0x4209e0
push ebp
call fcn.00420bb0
add esp, 4
push ebp
call fcn.00420610
mov eax, dword [ebp + 0x38]
add esp, 4
cmp eax, ebx
jne 0x420aa6
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
push ebp
call fcn.00420c80
add esp, 4
mov dword [ebp + 8], esi
mov dword [ebp + 0x14], edi
push ebx
push ebx
push ebx
call fcn.004225f0
mov esi, dword [esp + 0x2c]
add esp, 0xc
mov dword [ebp + 0x4c], eax
cmp dword [ebp + 0x38], ebx
jne 0x420aa6
cmp dword [ebp + 0x3c], ebx
jne 0x420aa6
mov eax, dword [ebp + 0x10]
mov edi, dword [esp + 0x10]
cmp eax, ebx
jne 0x4208ff
jmp 0x420aaa
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
jbe 0x420a0f
mov eax, ecx
cmp eax, ebx
jbe 0x420a52
mov esi, dword [ebp]
mov edi, dword [ebp + 0xc]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov esi, dword [ebp]
mov edx, dword [ebp + 0x10]
add ecx, eax
mov dword [esp + 0x18], ecx
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp + 4]
add esi, eax
sub edx, eax
sub ecx, eax
mov dword [ebp], esi
mov esi, dword [esp + 0x20]
mov dword [ebp + 0x10], edx
mov dword [ebp + 4], ecx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jbe 0x420a75
mov edx, dword [ebp + 0x40]
push edx
push eax
mov eax, dword [esp + 0x20]
push 1
push eax
call sub.MSVCRT.dll_fread
mov ecx, dword [ebp + 0x10]
add esp, 0x10
sub ecx, eax
mov dword [ebp + 0x10], ecx
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
sub esi, edi
add edx, esi
add ecx, esi
cmp esi, ebx
mov dword [ebp + 8], edx
mov dword [ebp + 0x14], ecx
jne 0x420a95
mov dword [ebp + 0x3c], 1
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [ebp + 0x38], 0xffffffff
jmp 0x420aaa
mov edi, dword [esp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x4c]
sub ecx, edi
push ecx
push edi
push edx
call fcn.004225f0
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0x4c], eax
mov eax, esi
add esp, 0xc
sub eax, ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
pop ecx
ret