Function at 0x41050d10
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rsi
mov eax, 0x20d0
call fcn.41295c90
sub rsp, rax
mov rax, qword [0x41359af8]
xor rax, rsp
mov qword [rsp + 0x20a0], rax
lea rcx, [rsp + 0x272]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x270], 0
call fcn.412121c0
xor esi, esi
mov rcx, rsi
lea rdx, str.C:log_
nop
movzx eax, word [rcx + rdx]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x26e], ax
jne 0x41050d70
lea rcx, [rsp + 0x692]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x690], si
call fcn.412121c0
lea rcx, [rsp + 0x62]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x60], si
call fcn.412121c0
lea rdx, [rsp + 0x60]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x60]
mov dx, 0x5c
call fcn.412120a0
lea rcx, [rsp + 0x8a2]
xor edx, edx
mov word [rax], si
mov r8d, 0x7fe
mov word [rsp + 0x8a0], si
call fcn.412121c0
lea r8, [rsp + 0x270]
lea rdx, str._sgswb.log
lea rcx, [rsp + 0x480]
call fcn.412122b0
lea rcx, [rsp + 0x480]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41051014
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x20c8], rbx
xor eax, eax
mov qword [rsp + 0x20c0], rbp
mov qword [rsp + 0x20b8], rdi
lea rdi, [rsp + 0x60]
repne scasw ax, word [rdi]
not rcx
lea rdx, [rsp + rcx*2 + 0x60]
lea rcx, [rsp + 0x690]
sub rcx, rdx
nop
nop
nop
movzx eax, word [rdx]
add rdx, 2
test ax, ax
mov word [rcx + rdx - 2], ax
jne 0x41050e70
lea r9, [rsp + 0x690]
lea r8, [rsp + 0x270]
lea rdx, str._s_s.txt
lea rcx, [rsp + 0x480]
call fcn.412122b0
mov r8, qword [rsp + 0x20e0]
lea r9, [rsp + 0x20e8]
lea rcx, [rsp + 0x8a0]
mov edx, 0x3ff
call fcn.41211f50
xor ecx, ecx
call fcn.41213550
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x58], rax
call fcn.412131e0
lea rcx, [rsp + 0x8a0]
mov r9d, dword [rax + 0x10]
mov r8d, dword [rax + 0x14]
mov qword [rsp + 0x40], rcx
mov ecx, dword [rax]
lea rdx, str.__d__d__d__d__d__d_:_s
add r9d, 1
mov dword [rsp + 0x38], ecx
mov ecx, dword [rax + 4]
add r8d, 0x76c
mov dword [rsp + 0x30], ecx
mov ecx, dword [rax + 8]
mov eax, dword [rax + 0xc]
mov dword [rsp + 0x28], ecx
lea rcx, [rsp + 0x10a0]
mov dword [rsp + 0x20], eax
call fcn.412122b0
lea rcx, [rsp + 0x480]
mov word [rsp + 0x109e], si
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea rdx, [0x4129b2b8]
lea rcx, [rsp + 0x480]
test eax, eax
mov ebp, 1
cmovne esi, ebp
call fcn.41214360
test rax, rax
mov rbx, rax
je 0x41050ffc
test esi, esi
jne 0x41050f8b
lea r8d, [rbp + 1]
lea rcx, [rsp + 0x54]
mov r9, rax
mov rdx, rbp
mov word [rsp + 0x54], 0xfeff
call fcn.41214130
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x10a0]
repne scasw ax, word [rdi]
mov r9, rbx
mov rdx, rbp
not rcx
sub rcx, rbp
add ecx, ecx
movsxd r8, ecx
lea rcx, [rsp + 0x10a0]
call fcn.41214130
lea rcx, [rsp + 0x50]
mov r9, rbx
mov r8d, 2
mov rdx, rbp
mov word [rsp + 0x50], 0xd
call fcn.41214130
lea rcx, [rsp + 0x50]
mov r9, rbx
mov r8d, 2
mov rdx, rbp
mov word [rsp + 0x50], 0xa
call fcn.41214130
mov rcx, rbx
call fcn.41213ed0
mov rbp, qword [rsp + 0x20c0]
mov rbx, qword [rsp + 0x20c8]
mov rdi, qword [rsp + 0x20b8]
mov rcx, qword [rsp + 0x20a0]
xor rcx, rsp
call fcn.41211b80
add rsp, 0x20d0
pop rsi
ret