Function at 0x647bce40
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64811698
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x64854008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x28], ecx
mov ebx, dword [ebp + 8]
xor esi, esi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
test edi, edi
je 0x647bcf1e
push 0xd
push edi
call dword [0x6481d394]
add esp, 8
test eax, eax
jne 0x647bceac
push 0xa
push edi
call dword [0x6481d394]
add esp, 8
test eax, eax
je 0x647bcf1e
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x647bceb1
sub ecx, edx
mov edx, 2
sar ecx, 1
lea eax, [ecx + 1]
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.6480380f
mov esi, eax
add esp, 4
mov ecx, esi
sub ecx, edi
movzx eax, word [edi]
lea edi, [edi + 2]
mov word [ecx + edi - 2], ax
test ax, ax
jne 0x647bcee2
push 0xd
push esi
call dword [0x6481d394]
add esp, 8
test eax, eax
je 0x647bcf07
xor ecx, ecx
mov word [eax], cx
push 0xa
push esi
call dword [0x6481d394]
add esp, 8
test eax, eax
je 0x647bcf1c
xor ecx, ecx
mov word [eax], cx
mov edi, esi
test ebx, ebx
je 0x647bcf4c
push 0xd
push ebx
call dword [0x6481d394]
add esp, 8
test eax, eax
je 0x647bcf37
xor ecx, ecx
mov word [eax], cx
push 0xa
push ebx
call dword [0x6481d394]
add esp, 8
test eax, eax
je 0x647bcf4c
xor ecx, ecx
mov word [eax], cx
xor eax, eax
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x647bcfe3
movzx ecx, word [ebx]
mov dword [ebp - 0x18], ecx
cmp ecx, 0x27
je 0x647bcf69
cmp ecx, 0x22
jne 0x647bcfe3
lea edx, [ebx + 2]
nop dword [eax]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x647bcf70
mov eax, dword [ebp - 0x14]
sub ebx, edx
sar ebx, 1
lea edx, [ebx + ebx]
cmp word [edx + eax - 2], cx
jne 0x647bd056
xor ecx, ecx
lea eax, [ebx + 3]
mov edx, 2
mul edx
push 0x64859cc5
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.64803607
add esp, 8
mov dword [ebp - 0x20], eax
test eax, eax
je 0x647bcfe0
mov ecx, dword [ebp - 0x18]
lea edx, [ebx + ebx]
push edx
push dword [ebp - 0x14]
mov word [edx + eax + 2], cx
mov word [eax], cx
lea ecx, [eax + 2]
push ecx
call fcn.6480765a
mov eax, dword [ebp - 0x20]
add esp, 0xc
xor ecx, ecx
mov word [eax + ebx*2 + 4], cx
mov ebx, dword [ebp - 0x14]
push dword [ebp - 0x24]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x647bd038
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push dword [ebp - 0x24]
mov eax, 0xfeff
mov word [ebp - 0x14], ax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x647bd038
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 2
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
test eax, eax
push dword [ebp - 0x24]
cmovne ebx, eax
push ebx
push edi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x647bd05a
xor edi, edi
jmp 0x647bd062
mov ebx, eax
jmp 0x647bcfe3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x20]
push eax
call fcn.64803602
add esp, 4
test esi, esi
je 0x647bd07d
push 2
push esi
call fcn.64803229
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.648031e0
mov esp, ebp
pop ebp
ret