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

Disassembly:
mov eax, 0x203c
call fcn.00441e50
mov eax, dword [0x569338]
xor eax, esp
mov dword [esp + 0x2038], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x206
lea eax, [esp + 0x22e]
push ebx
push eax
mov word [esp + 0x234], bx
call fcn.00433df0
add esp, 0xc
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [eax + 0x560688]
mov word [esp + eax + 0x228], cx
add eax, 2
cmp cx, bx
jne 0x418940
push 0x206
lea ecx, [esp + 0x63e]
push ebx
push ecx
mov word [esp + 0x644], bx
call fcn.00433df0
push 0x206
lea edx, [esp + 0x32]
push ebx
push edx
mov word [esp + 0x38], bx
call fcn.00433df0
add esp, 0x18
push 0x104
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x20]
push 0x5c
push ecx
call fcn.0042d094
add esp, 8
cmp dword [0x576934], ebx
mov word [eax], bx
je 0x4189cf
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x22c]
push str._slog_
push eax
call fcn.0042d101
add esp, 0xc
push 0x7fe
lea ecx, [esp + 0x846]
push ebx
push ecx
mov word [esp + 0x84c], bx
call fcn.00433df0
lea edx, [esp + 0x234]
push edx
lea eax, [esp + 0x440]
push str._sgswb.log
push eax
call fcn.0042d101
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x18
lea ecx, [esp + 0x430]
push ecx
call esi
test eax, eax
je 0x418baa
lea eax, [esp + 0x20]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x418a26
sub eax, edx
sar eax, 1
lea eax, [esp + eax*2 + 0x22]
lea edx, [esp + 0x638]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x418a42
lea edx, [esp + 0x638]
push edx
lea eax, [esp + 0x22c]
push eax
lea ecx, [esp + 0x438]
push str._s_s.txt
push ecx
call fcn.0042d101
mov eax, dword [esp + 0x205c]
lea edx, [esp + 0x2060]
push edx
push eax
lea ecx, [esp + 0x858]
push 0x3ff
push ecx
call fcn.0042dc1a
push ebx
call fcn.0042d833
mov dword [esp + 0x40], edx
lea edx, [esp + 0x3c]
push edx
mov dword [esp + 0x40], eax
call fcn.0042e7ab
mov edx, dword [eax]
lea ecx, [esp + 0x868]
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax + 8]
push ecx
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
push ecx
add edx, 1
push edx
add eax, 0x76c
push eax
lea ecx, [esp + 0x1084]
push str.__d__d__d__d__d__d_:_s
push ecx
call fcn.0042d101
add esp, 0x4c
lea edx, [esp + 0x430]
push edx
mov word [esp + 0x1042], bx
xor edi, edi
call esi
test eax, eax
je 0x418b06
mov edi, 1
lea eax, [esp + 0x430]
push 0x5606c4
push eax
call fcn.0042dda9
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x418baa
cmp edi, ebx
jne 0x418b43
push esi
push 2
lea ecx, [esp + 0x1c]
push 1
push ecx
mov dword [esp + 0x24], 0xfeff
call fcn.0042df1b
add esp, 0x10
lea eax, [esp + 0x1040]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x418b50
sub eax, edx
sar eax, 1
push esi
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x1048]
push 1
push eax
call fcn.0042df1b
push esi
push 2
lea ecx, [esp + 0x28]
push 1
push ecx
mov dword [esp + 0x30], 0xd
call fcn.0042df1b
push esi
push 2
lea edx, [esp + 0x38]
push 1
push edx
mov dword [esp + 0x40], 0xa
call fcn.0042df1b
push esi
call fcn.0042e00f
add esp, 0x34
mov ecx, dword [esp + 0x2044]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0042d085
add esp, 0x203c
ret