Function at 0x517c00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0x14], ecx
cmp dword [ebp + 8], 0
jne 0x517c26
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x14]
call fcn.0051c4a0
xor al, al
jmp 0x517f2a
mov ecx, dword [ebp - 0x14]
call fcn.005151a0
mov ecx, dword [ebp - 0x14]
add ecx, 4
call fcn.00519560
mov dword [ebp - 0xc], 0
push 2
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0053fcd3
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
call fcn.005400e6
add esp, 4
mov dword [ebp - 0xc], eax
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0053fcd3
add esp, 0xc
cmp dword [ebp - 0xc], 0
jg 0x517c8c
push 0
push 0
push 0
push 0xc
mov ecx, dword [ebp - 0x14]
call fcn.0051c4a0
xor al, al
jmp 0x517f2a
mov eax, dword [ebp - 0xc]
add eax, 1
push eax
call fcn.0051d4c8
add esp, 4
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 8], ecx
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 8]
mov byte [ecx + eax], 0
mov edx, dword [ebp + 8]
push edx
push 1
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.0053fb98
add esp, 0x10
cmp eax, 1
je 0x517cf7
mov edx, dword [ebp - 8]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
push eax
call fcn.00538881
add esp, 4
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x14]
call fcn.0051c4a0
xor al, al
jmp 0x517f2a
cmp dword [ebp + 0xc], 3
je 0x517d22
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx]
cmp edx, 0xff
jne 0x517e54
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + 1]
cmp ecx, 0xfe
jne 0x517e54
mov dword [ebp + 0xc], 0
mov edx, dword [ebp - 0x14]
mov byte [edx + 0x6d], 1
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar eax, 1
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0051d4c8
add esp, 4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar eax, 1
lea ecx, [eax + eax + 2]
push ecx
push 0
mov edx, dword [ebp - 0x1c]
push edx
call fcn.005392b0
add esp, 0xc
mov eax, dword [ebp - 8]
movzx ecx, byte [eax]
cmp ecx, 0xff
jne 0x517db0
mov edx, dword [ebp - 8]
movzx eax, byte [edx + 1]
cmp eax, 0xfe
jne 0x517db0
mov ecx, dword [ebp - 0xc]
sub ecx, 2
push ecx
mov edx, dword [ebp - 8]
add edx, 2
push edx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00538be0
add esp, 0xc
jmp 0x517dc4
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00538be0
add esp, 0xc
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
push edx
call fcn.00538881
add esp, 4
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov eax, dword [ebp - 0x1c]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
add ecx, 1
push ecx
call fcn.0051d4c8
add esp, 4
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
add eax, 1
push eax
push 0
mov ecx, dword [ebp - 8]
push ecx
call fcn.005392b0
add esp, 0xc
push 0
push 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x1c]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.00538881
add esp, 4
jmp 0x517e5b
mov ecx, dword [ebp - 0x14]
mov byte [ecx + 0x6d], 0
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov byte [ebp - 1], 0xd
mov byte [ebp - 2], 0xa
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx], 0
mov edx, dword [ebp - 0x10]
movsx eax, byte [edx]
test eax, eax
je 0x517ed9
mov ecx, dword [ebp - 0x10]
movsx edx, byte [ecx]
cmp edx, 0xd
jne 0x517ebb
mov eax, dword [ebp - 0x18]
mov byte [eax], 0xa
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
movsx ecx, byte [eax]
cmp ecx, 0xa
jne 0x517eb9
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
jmp 0x517ed7
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x517e78
mov edx, dword [ebp - 0x18]
mov byte [edx], 0
mov eax, dword [ebp + 0xc]
push eax
push 0
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x14]
mov edx, dword [eax + 8]
call edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00538881
add esp, 4
mov ecx, dword [ebp - 0x14]
call fcn.00519620
movzx edx, al
test edx, edx
jne 0x517f20
mov dword [ebp - 0x20], 1
jmp 0x517f27
mov dword [ebp - 0x20], 0
mov al, byte [ebp - 0x20]
mov esp, ebp
pop ebp
ret 8