Function at 0x476180
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
xor ebx, ebx
xorps xmm0, xmm0
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ebx
movlpd qword [ebp - 0x20], xmm0
cmp dword [0x6023f4], ebx
jle 0x4761b0
lea eax, [ebp - 0x20]
push eax
call fcn.004f737a
add esp, 4
mov esi, dword [ebp + 8]
cmp dword [0x602254], ebx
jne 0x476399
mov eax, dword [esi + 0x1c7d28]
cmp eax, dword [esi + 0x1c7d2c]
jb 0x476399
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x47628e
test edi, edi
je 0x476285
nop word [eax + eax]
mov eax, dword [esi + 0x125c84]
cmp eax, 0xffffffff
je 0x476285
push edi
push ecx
push eax
call fcn.005072ed
add esp, 0xc
mov dword [ebp + 0x10], eax
test eax, eax
jne 0x476238
cmp dword [0x6023f4], eax
jne 0x476238
cmp dword [0x6023dc], eax
je 0x476285
push eax
push ebx
push dword [esi + 0x1c7d38]
call fcn.00476b80
add esp, 0xc
test eax, eax
je 0x476285
mov eax, dword [ebp + 0x10]
cmp dword [0x5c982c], 0
jne 0x476285
cmp eax, 0xffffffff
jne 0x47625a
push str.Error_reading_input_file__n
push 8
call fcn.0048eb50
mov ecx, dword [ebp - 8]
add esp, 8
jmp 0x47627d
test eax, eax
jne 0x476271
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.00476b00
mov ecx, dword [ebp - 8]
add esp, 8
jmp 0x47627d
mov ecx, dword [ebp - 8]
add ebx, eax
sub edi, eax
add ecx, eax
mov dword [ebp - 8], ecx
test edi, edi
jne 0x4761f0
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x47638f
nop word [eax + eax]
cmp dword [esi + 0x125c84], 0xffffffff
je 0x47638f
cmp dword [0x5c982c], 0
jne 0x47638f
push 1
push 0
push 0
push dword [esi + 0x125c84]
call fcn.00501328
mov ecx, eax
mov dword [ebp - 0xc], edx
add esp, 0x10
mov dword [ebp - 0x10], ecx
mov eax, edi
add eax, ecx
mov ecx, 0
adc ecx, edx
mov dword [ebp - 0x14], ecx
js 0x476678
jg 0x4762f4
test eax, eax
jb 0x476678
push 1
push 0
push edi
push dword [esi + 0x125c84]
call fcn.00501328
mov dword [ebp - 8], edx
add esp, 0x10
mov edx, dword [ebp - 0x10]
mov ecx, edx
and ecx, dword [ebp - 0xc]
cmp ecx, 0xffffffff
jne 0x476347
mov ecx, eax
and ecx, dword [ebp - 8]
cmp ecx, 0xffffffff
jne 0x476347
test edi, edi
je 0x476340
mov ebx, edi
push 1
lea eax, [ebp + 0x13]
push eax
push dword [esi + 0x125c84]
call fcn.005072ed
add esp, 0xc
sub ebx, 1
jne 0x476327
mov ebx, edi
mov dword [ebp - 4], edi
jmp 0x47634e
sub eax, edx
add ebx, eax
mov dword [ebp - 4], ebx
sub edi, ebx
test ebx, ebx
jne 0x476387
cmp dword [0x6023f4], ebx
je 0x47636c
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.00476b00
add esp, 8
jmp 0x476387
cmp dword [0x6023dc], 0
je 0x47638f
push 0
push 0
push dword [esi + 0x1c7d38]
call fcn.00476b80
add esp, 0xc
test edi, edi
jne 0x4762a0
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
xor eax, eax
cmp dword [esi + 0x125c84], 0xffffffff
mov dword [ebp - 8], ecx
sete al
mov dword [ebp - 0x10], eax
mov edx, 8
test eax, eax
je 0x4763c0
cmp dword [0x6023f4], 0
je 0x47638f
test edi, edi
je 0x47638f
cmp dword [0x5c982c], 0
jne 0x47638f
test eax, eax
je 0x4763e7
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.00476b00
mov ecx, dword [ebp - 8]
add esp, 8
mov edx, 8
mov eax, dword [esi + 0x1c7d2c]
mov ebx, eax
sub ebx, dword [esi + 0x1c7d28]
jne 0x47651e
cmp dword [0x602254], ebx
je 0x476570
mov ecx, dword [esi + 0x1c7d1c]
mov ebx, eax
cmp ebx, 8
mov eax, ecx
cmova ebx, edx
sub eax, ebx
mov dword [ebp - 0xc], ebx
add eax, dword [0x5c78e0]
push ebx
push eax
push ecx
call fcn.004f18a0
mov eax, dword [0x6024fc]
add esp, 0xc
test eax, eax
je 0x476486
cmp eax, 1
je 0x476486
cmp eax, 3
mov eax, dword [0x5c78e0]
jne 0x47645e
sub eax, ebx
push eax
mov eax, dword [esi + 0x1c7d1c]
add eax, ebx
push eax
push dword [esi + 0x125c84]
call fcn.0047d3a0
jmp 0x4764a2
push dword [0x6024dc]
sub eax, ebx
push dword [0x6024d8]
push eax
mov eax, dword [esi + 0x1c7d1c]
add eax, ebx
push eax
push dword [esi + 0x125c84]
call fcn.0047d450
add esp, 0x14
jmp 0x4764a5
mov eax, dword [0x5c78e0]
sub eax, ebx
push eax
mov eax, dword [esi + 0x1c7d1c]
add eax, ebx
push eax
push dword [esi + 0x125c84]
call fcn.005072ed
add esp, 0xc
cmp dword [0x5c982c], 0
mov ebx, eax
jne 0x47638f
cmp ebx, 0xffffffff
jne 0x4764ca
push str.Error_reading_input_stream__n
push 8
call fcn.0048eb50
add esp, 8
jmp 0x47650d
test ebx, ebx
jne 0x47650d
cmp dword [0x6023f4], ebx
jne 0x476506
mov eax, dword [esi + 0x1c7d38]
cmp dword [eax + 0xc], ebx
jl 0x476506
jg 0x4764eb
mov ecx, dword [ebp - 0x14]
cmp dword [eax + 8], ecx
jbe 0x476506
cmp dword [0x6023dc], 0
je 0x476506
push 0
push dword [ebp - 4]
push eax
call fcn.00476b80
add esp, 0xc
test eax, eax
jne 0x47650d
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x1c7d28], eax
add eax, ebx
mov dword [esi + 0x1c7d2c], eax
mov ecx, dword [ebp - 8]
cmp ebx, edi
mov eax, dword [ebp - 0x10]
mov edx, 8
cmovae ebx, edi
test ebx, ebx
je 0x4763b3
test ecx, ecx
je 0x476559
mov eax, dword [esi + 0x1c7d1c]
add eax, dword [esi + 0x1c7d28]
push ebx
push eax
push ecx
call fcn.004f1320
mov ecx, dword [ebp - 8]
add esp, 0xc
add ecx, ebx
mov dword [ebp - 8], ecx
add dword [esi + 0x1c7d28], ebx
sub edi, ebx
add dword [ebp - 4], ebx
mov eax, dword [ebp - 0x10]
jmp 0x4763ae
test ecx, ecx
je 0x47659f
push edi
push ecx
push dword [esi + 0x125c84]
call fcn.005072ed
mov ebx, eax
add esp, 0xc
cmp ebx, 0xffffffff
jne 0x47659a
push str.Error_reading_input_file__n
push 8
call fcn.0048eb50
add esp, 8
add dword [ebp - 8], ebx
jmp 0x4765ee
push 1
push 0
push 0
push dword [esi + 0x125c84]
call fcn.00501328
mov ecx, eax
add esp, 0x10
mov eax, edi
mov dword [ebp + 0x10], ecx
add eax, ecx
mov ecx, 0
adc ecx, edx
mov dword [ebp - 0x14], ecx
js 0x476678
jg 0x4765d6
test eax, eax
jb 0x476678
push 1
push 0
push edi
push dword [esi + 0x125c84]
call fcn.00501328
mov ebx, eax
add esp, 0x10
sub ebx, dword [ebp + 0x10]
mov ecx, dword [0x6023f4]
test ebx, ebx
jne 0x47661e
test ecx, ecx
je 0x47661e
cmp dword [0x6024fc], 1
je 0x476664
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.00476b00
mov ecx, dword [0x6023f4]
add esp, 8
mov eax, dword [ebp - 4]
jmp 0x47662c
mov eax, dword [ebp - 4]
sub edi, ebx
add eax, ebx
mov dword [ebp - 4], eax
test ebx, ebx
jne 0x476654
test ecx, ecx
jne 0x476654
cmp dword [0x6023dc], ecx
je 0x47638f
push ecx
push eax
push dword [esi + 0x1c7d38]
call fcn.00476b80
add esp, 0xc
test eax, eax
je 0x47638f
test edi, edi
je 0x47638f
mov ecx, dword [ebp - 8]
jmp 0x476570
mov eax, dword [ebp - 4]
pop edi
pop esi
mov dword [0x6023f4], 0
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret