Function at 0x517f30
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 0x6c]
test ecx, ecx
je 0x517f8e
mov edx, dword [ebp - 0xc]
movzx eax, byte [edx + 0x6d]
test eax, eax
jne 0x517f8e
mov byte [ebp - 1], 0xef
mov byte [ebp - 2], 0xbb
mov byte [ebp - 3], 0xbf
mov ecx, dword [ebp + 8]
push ecx
push 0xef
call fcn.0053f7b6
add esp, 8
mov edx, dword [ebp + 8]
push edx
push 0xbb
call fcn.0053f7b6
add esp, 8
mov eax, dword [ebp + 8]
push eax
push 0xbf
call fcn.0053f7b6
add esp, 8
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax + 4]
call edx
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 0x6d]
test ecx, ecx
je 0x518144
mov dword [ebp - 0x10], 0
push 2
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0053fcd3
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
call fcn.005400e6
add esp, 4
mov dword [ebp - 0x10], eax
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0053fcd3
add esp, 0xc
cmp dword [ebp - 0x10], 0
jg 0x517ff3
xor al, al
jmp 0x518167
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
call fcn.0051d4c8
add esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 8], eax
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 8]
mov byte [eax + edx], 0
mov ecx, dword [ebp + 8]
push ecx
push 1
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.0053fb98
add esp, 0x10
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x10]
mov byte [ecx], 0
cmp dword [ebp - 0x24], 1
je 0x51805b
mov edx, dword [ebp - 8]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
push eax
call fcn.00538881
add esp, 4
xor al, al
jmp 0x518167
push 0
push 0
push 0xffffffffffffffff
mov ecx, dword [ebp - 8]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x18], eax
xor ecx, ecx
mov eax, dword [ebp - 0x18]
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 - 0x14], eax
mov ecx, dword [ebp - 0x18]
shl ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x14]
push edx
call fcn.005392b0
add esp, 0xc
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp - 8]
push edx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.00538881
add esp, 4
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0053fcd3
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
push 0xff
call fcn.0053f7b6
add esp, 8
mov ecx, dword [ebp + 8]
push ecx
push 0xfe
call fcn.0053f7b6
add esp, 8
mov edx, dword [ebp - 0x14]
push edx
call fcn.00539af1
add esp, 4
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push 2
mov edx, dword [ebp - 0x14]
push edx
call fcn.005402ab
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00538881
add esp, 4
mov edx, dword [ebp + 8]
push edx
call fcn.0053f4e0
add esp, 4
test eax, eax
jne 0x51815d
mov dword [ebp - 0x1c], 1
jmp 0x518164
mov dword [ebp - 0x1c], 0
mov al, byte [ebp - 0x1c]
mov esp, ebp
pop ebp
ret 4