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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x203c
call fcn.100ac780
mov eax, dword [0x101bd92c]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x41c], ax
lea eax, [ebp - 0x41a]
push eax
call fcn.10098090
add esp, 0xc
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + str.C:log_]
mov word [ebp + eax - 0x41c], cx
lea eax, [eax + 2]
test cx, cx
jne 0x100146c0
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x102c], ax
lea eax, [ebp - 0x102a]
push eax
call fcn.10098090
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x624]
push str._sgswb.log
push eax
call fcn.10091da4
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x82c], ax
lea eax, [ebp - 0x82a]
push eax
call fcn.10098090
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x214], ax
lea eax, [ebp - 0x212]
push eax
call fcn.10098090
add esp, 0x30
lea eax, [ebp - 0x214]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x214]
push 0x5c
push eax
call fcn.10092237
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ecx, ecx
add esp, 8
mov word [eax], cx
lea eax, [ebp - 0x624]
push eax
call esi
test eax, eax
je 0x10014911
lea ecx, [ebp - 0x214]
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10014790
sub ecx, edx
sar ecx, 1
lea edx, [ebp - 0x212]
lea ecx, [edx + ecx*2]
lea edx, [ebp - 0x82c]
sub edx, ecx
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x100147b0
lea eax, [ebp - 0x82c]
push eax
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x624]
push str._s_s.txt
push eax
call fcn.10091da4
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x102c]
push 0x3ff
push eax
call fcn.10095cf0
push 0
call fcn.100959b2
mov dword [ebp - 0x203c], eax
lea eax, [ebp - 0x203c]
push eax
mov dword [ebp - 0x2038], edx
call fcn.10095662
push dword [ebp + 8]
mov ecx, eax
push dword [ecx]
mov eax, dword [ecx + 0x10]
push dword [ecx + 4]
inc eax
push dword [ecx + 8]
push dword [ecx + 0xc]
push eax
mov eax, dword [ecx + 0x14]
add eax, 0x76c
push eax
lea eax, [ebp - 0x202c]
push str.__d__d__d__d__d__d_:_s
push eax
call fcn.10091da4
xor eax, eax
add esp, 0x4c
mov word [ebp - 0x82e], ax
lea eax, [ebp - 0x624]
push eax
xor edi, edi
call esi
test eax, eax
lea eax, [ebp - 0x624]
mov ecx, 1
push 0x101925f0
push eax
cmovne edi, ecx
call fcn.10095c11
mov esi, eax
add esp, 8
test esi, esi
je 0x10014911
test edi, edi
jne 0x100148a5
push esi
push 2
lea eax, [ebp - 0x2034]
push 1
push eax
mov dword [ebp - 0x2034], 0xfeff
call fcn.10095f35
add esp, 0x10
lea ecx, [ebp - 0x202c]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100148b0
sub ecx, edx
sar ecx, 1
push esi
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x202c]
push 1
push eax
call fcn.10095f35
push esi
push 2
lea eax, [ebp - 0x2030]
push 1
push eax
mov dword [ebp - 0x2030], 0xd
call fcn.10095f35
push esi
push 2
lea eax, [ebp - 0x2030]
push 1
push eax
mov dword [ebp - 0x2030], 0xa
call fcn.10095f35
push esi
call fcn.1009601f
add esp, 0x34
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.1009174c
mov esp, ebp
pop ebp
ret