Function at 0x417bd0
Capabilities:
Read file on windows

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x1c
mov eax, dword [0xd8d914]
test eax, 0x800
je 0x418082
mov ebx, dword [0xd8d918]
shl ebx, 4
mov eax, dword [ebx*8 + 0xd8d97c]
test eax, eax
jne 0x418069
mov esi, dword [esp + 0x30]
test esi, esi
je 0x417c72
mov eax, dword [esi + 0x14]
test eax, eax
je 0x417c72
mov eax, dword [eax]
mov dword [0x51acc8], eax
mov eax, dword [ebx*8 + 0xd8d944]
test eax, eax
jne 0x417c47
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x417c66
mov eax, dword [0x51acc8]
mov ebx, dword [ebx*8 + 0xd8d964]
add eax, ebx
mov dword [0x516e28], eax
jmp 0x417c5b
mov eax, dword [esi + 0x14]
mov ebx, dword [ebx*8 + 0xd8d964]
mov eax, dword [eax]
add ebx, eax
mov dword [0x516e28], ebx
mov eax, dword [esi + 0x14]
add esp, 0x1c
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, dword [0xd8d75c]
mov dword [0x516e28], eax
jmp 0x417c5b
mov eax, dword [ebx*8 + 0xd8d964]
mov dword [esp + 0x14], ecx
mov dword [esp], eax
call fcn.00418300
mov edi, eax
mov ecx, dword [esp + 0x14]
test edi, edi
je 0x41803b
mov eax, dword [ebx*8 + 0xd8d944]
test eax, eax
jne 0x417e4b
mov eax, dword [ebx*8 + 0xd8d930]
test eax, eax
je 0x418015
mov eax, dword [ebx*8 + 0xd8d96c]
test eax, eax
jne 0x417d64
mov eax, dword [ebx*8 + 0xd8d998]
cmp eax, 1
je 0x417d55
test esi, esi
je 0x417d19
mov eax, dword [esi + 8]
add eax, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov edx, dword [ebx*8 + 0xd8d95c]
cmp edx, eax
je 0x417d23
mov eax, dword [ebx*8 + 0xd8d94c]
mov edx, dword [edi + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0041dda8
test eax, eax
jl 0x417f7a
mov dword [ebx*8 + 0xd8d95c], eax
jmp 0x417d23
mov eax, dword [ebx*8 + 0xd8d95c]
mov dword [edi + 0x10], eax
mov eax, dword [edi + 0x10]
test eax, eax
jl 0x417f8c
mov eax, dword [ebx*8 + 0xd8d94c]
mov edx, dword [edi]
mov ecx, dword [ebx*8 + 0xd8d964]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call fcn.0041f3d7
mov ecx, eax
jmp 0x417e22
mov dword [0x515704], 0x413
jmp 0x417e22
mov eax, dword [ebx*8 + 0xd8d934]
cmp eax, 2
je 0x417ff9
mov eax, dword [ebx*8 + 0xd8d92c]
test eax, eax
je 0x417da9
mov edx, dword [edi]
mov ecx, dword [ebx*8 + 0xd8d920]
mov dword [esp + 4], 1
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
call fcn.0041df07
mov ecx, eax
jmp 0x417e22
mov eax, dword [edi]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebx*8 + 0xd8d964]
cmp ecx, eax
jge 0x417e22
mov eax, dword [ebx*8 + 0xd8d920]
mov edx, dword [eax + 4]
dec edx
mov dword [eax + 4], edx
test edx, edx
jl 0x417f9d
mov eax, dword [ebx*8 + 0xd8d920]
xor edx, edx
mov ebp, dword [eax]
inc ebp
mov dword [eax], ebp
mov eax, edx
mov al, byte [ebp - 1]
mov edx, dword [esp + 0x10]
mov ebp, eax
mov eax, edx
mov dword [esp + 0x18], ebx
add eax, ecx
mov ebx, ebp
shl ebx, 0x18
sar ebx, 0x18
cmp ebx, 0xffffffff
mov ebx, ebp
mov byte [ecx + edx], bl
mov ebx, dword [esp + 0x18]
je 0x417e20
inc ecx
mov al, byte [eax]
cmp al, 0xa
jne 0x417db1
jmp 0x417e22
xor ecx, ecx
test ecx, ecx
jl 0x417fe7
test ecx, ecx
je 0x417fc0
add dword [ebx*8 + 0xd8d95c], ecx
mov eax, dword [edi]
mov dword [edi + 8], ecx
add ecx, eax
mov dword [0x516e28], ecx
jmp 0x417f62
test esi, esi
je 0x417e59
mov eax, dword [ebx*8 + 0xd8d964]
mov dword [esi + 8], eax
mov dword [edi + 0xc], 1
mov eax, dword [edi]
mov dword [edi + 8], 0
mov edx, dword [ebx*8 + 0xd8d964]
add edx, eax
test esi, esi
mov dword [0x516e28], edx
je 0x417e89
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 8]
add eax, edx
mov dword [edi + 0x10], eax
jmp 0x417e93
mov eax, dword [ebx*8 + 0xd8d95c]
mov dword [edi + 0x10], eax
mov eax, dword [0xd8d914]
test eax, 0x400
jne 0x417f2c
mov eax, dword [edi + 0x10]
mov edx, dword [ebx*8 + 0xd8d960]
cmp eax, edx
jge 0x417f2c
mov edx, dword [ebx*8 + 0xd8d998]
cmp edx, 1
je 0x417f2c
mov edx, dword [ebx*8 + 0xd8d95c]
cmp edx, eax
je 0x417efa
mov edx, dword [ebx*8 + 0xd8d94c]
mov dword [esp + 4], eax
mov dword [esp + 8], 0
mov dword [esp], edx
call fcn.0041dda8
test eax, eax
jl 0x418057
mov dword [ebx*8 + 0xd8d95c], eax
mov eax, dword [ebx*8 + 0xd8d94c]
mov edx, dword [edi]
mov ecx, dword [ebx*8 + 0xd8d964]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call fcn.0041f3d7
test eax, eax
jl 0x418045
mov dword [edi + 8], eax
add dword [ebx*8 + 0xd8d95c], eax
mov eax, dword [ebx*8 + 0xd8d98c]
cmp eax, 1
je 0x417f46
mov eax, dword [0xd8d914]
test eax, 0x400
jne 0x417f62
mov eax, dword [edi]
mov edx, dword [edi + 8]
mov ebx, dword [ebx*8 + 0xd8d964]
add eax, edx
sub ebx, edx
mov dword [esp], eax
mov dword [esp + 4], ebx
call fcn.00416ef0
mov eax, dword [edi]
test esi, esi
mov dword [0x51acc8], eax
je 0x417f70
mov dword [esi + 0x14], edi
add esp, 0x1c
mov eax, edi
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp], edi
call fcn.004185b0
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp], str.buf_next:_bad_fileposition
call fcn.00416e00
jmp 0x417d2e
mov eax, dword [ebx*8 + 0xd8d920]
mov dword [esp + 0x14], ecx
mov dword [esp], eax
call fcn.0041dac5
mov ecx, dword [esp + 0x14]
jmp 0x417de9
mov dword [ebx*8 + 0xd8d940], 1
mov dword [0x515704], 0xffffffff
mov dword [esp], edi
call fcn.004185b0
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp], edi
call fcn.004185b0
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [0x515704], 0x3eb
mov dword [esp], edi
call fcn.004185b0
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, dword [ebx*8 + 0xd8d928]
mov dword [esp], eax
call fcn.00418a60
mov ecx, eax
test eax, eax
je 0x417cb1
mov dword [0x515704], eax
mov dword [esp], edi
call fcn.004185b0
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp], edi
call fcn.004185b0
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp], edi
call fcn.004185b0
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp], str.buf_next:_async
mov dword [esp + 0x14], ecx
call fcn.00416e00
mov ecx, dword [esp + 0x14]
jmp 0x417bff
mov dword [0x515704], 0xffffffff
add esp, 0x1c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret