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

Disassembly:
mov eax, 0x1c54
call fcn.0040cfb0
mov eax, dword [0x425044]
xor eax, esp
mov dword [esp + 0x1c4c], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x206
lea eax, [esp + 0x82e]
push ebx
push eax
mov word [esp + 0x834], bx
call fcn.004054f0
add esp, 0xc
push 0x206
lea ecx, [esp + 0x1256]
push ebx
push ecx
mov word [esp + 0x125c], bx
call fcn.004054f0
add esp, 0xc
push 0x206
lea edx, [esp + 0x104e]
push ebx
push edx
mov word [esp + 0x1054], bx
call fcn.004054f0
xor eax, eax
add esp, 0xc
push 0x7e
mov dword [esp + 0x66e], eax
mov dword [esp + 0x672], eax
mov dword [esp + 0x676], eax
mov dword [esp + 0x67a], eax
mov dword [esp + 0x67e], eax
mov dword [esp + 0x682], eax
mov dword [esp + 0x686], eax
mov word [esp + 0x68a], ax
lea eax, [esp + 0x72e]
push ebx
push eax
mov word [esp + 0x674], bx
mov word [esp + 0x734], bx
call fcn.004054f0
add esp, 0xc
push 0x7e
lea ecx, [esp + 0x6ae]
push ebx
push ecx
mov word [esp + 0x6b4], bx
call fcn.004054f0
add esp, 0xc
push 0x7e
lea edx, [esp + 0x7ae]
push ebx
push edx
mov dword [esp + 0x20], ebx
mov word [esp + 0x7b4], bx
call fcn.004054f0
add esp, 0xc
push 0x206
lea eax, [esp + 0xc3e]
push ebx
push eax
mov dword [esp + 0x24], ebx
mov word [esp + 0xc44], bx
call fcn.004054f0
xor eax, eax
add esp, 0xc
push 0x200
mov word [esp + 0x68c], bx
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
xor ebp, ebp
mov dword [esp + 0x28], ebx
push ebx
lea ecx, [esp + 0x38]
push ecx
call fcn.004054f0
add esp, 0xc
push 1
lea edi, [esp + 0x34]
call fcn.0040e0f0
add esp, 4
mov esi, eax
push ebx
lea edi, [esp + 0x46c]
mov dword [esp + 0x2c], esi
call fcn.0040e0f0
add esp, 4
push 0x104
lea edx, [esp + 0x1254]
push edx
push ebx
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov edi, dword [sym.imp.KERNEL32.DLL_GetTempPathW]
lea eax, [esp + 0x828]
push eax
push 0x104
call edi
push 0x4230ac
lea ecx, [esp + 0x82c]
push 0x104
push ecx
call fcn.00401187
lea eax, [esp + 0x834]
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x416583
sub eax, ecx
sar eax, 1
je 0x4165b5
lea edx, [esp + 0x828]
push edx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4165b5
lea eax, [esp + 0x828]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp esi, ebx
je 0x416892
lea ecx, [esp + 0x828]
push ecx
push 0x104
call edi
lea edx, [esp + 0x1b8]
push edx
lea eax, [esp + 0x82c]
push 0x104
push eax
call fcn.00401187
add esp, 0xc
push 0x4230f4
lea ecx, [esp + 0x82c]
push 0x104
push ecx
call fcn.00401187
lea eax, [esp + 0x834]
add esp, 0xc
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x416610
sub eax, edx
sar eax, 1
je 0x416680
lea edx, [esp + 0x828]
push edx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x416680
xor eax, eax
jmp 0x416640
movzx ecx, word [esp + eax + 0x1b8]
mov word [esp + eax + 0x230], cx
add eax, 2
cmp cx, bx
jne 0x416640
push 0x423100
lea eax, [esp + 0x234]
push 0x104
push eax
call fcn.00401187
add esp, 0xc
lea ecx, [esp + 0x828]
push ecx
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
lea edx, [esp + 0x1d8]
push edx
lea eax, [esp + 0x66c]
push 0x10
push eax
call fcn.00401201
add esp, 0xc
lea edi, [esp + 0x828]
lea esi, [esp + 0x1d8]
call fcn.00414eb0
call fcn.00415b10
cmp eax, 1
jne 0x4166be
xor eax, eax
jmp 0x416e4b
push 0x206
lea ecx, [esp + 0xa36]
push ebx
push ecx
mov word [esp + 0xa3c], bx
call fcn.004054f0
add esp, 0xc
push 0x206
lea edx, [esp + 0xe46]
push ebx
push edx
mov word [esp + 0xe4c], bx
call fcn.004054f0
add esp, 0xc
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x1d8]
mov word [esp + eax + 0xa30], cx
add eax, 2
cmp cx, bx
jne 0x416700
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x1d8]
mov word [esp + eax + 0xe40], cx
add eax, 2
cmp cx, bx
jne 0x416720
lea eax, [esp + 0xe40]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x416742
mov ecx, dword [0x423160]
mov edx, dword [0x423164]
mov edi, dword [sym.imp.KERNEL32.DLL_OpenEventW]
mov dword [eax], ecx
mov ecx, dword [0x423168]
mov dword [eax + 4], edx
lea edx, [esp + 0xa30]
push edx
push ebx
push 0x20000
mov dword [eax + 8], ecx
call edi
cmp eax, ebx
je 0x4167dc
mov ebp, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
call ebp
lea eax, [esp + 0xe40]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateEventW]
lea ecx, [esp + 0xa30]
push ecx
push ebx
push 0x20000
xor esi, esi
call edi
cmp eax, ebx
je 0x4167dc
cmp esi, 5
jge 0x4167dc
push eax
call ebp
push 0x1f4
add esi, 1
call dword [sym.imp.KERNEL32.DLL_Sleep]
lea edx, [esp + 0xa30]
push edx
push ebx
push 0x20000
call edi
cmp eax, ebx
jne 0x4167b2
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
lea eax, [esp + 0x828]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
xor eax, eax
jmp 0x416800
movzx ecx, word [esp + eax + 0xb6]
mov word [esp + eax + 0x728], cx
add eax, 2
cmp cx, bx
jne 0x416800
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x34]
mov word [esp + eax + 0x6a8], cx
add eax, 2
cmp cx, bx
jne 0x416820
movzx ecx, word [esp + 0xb4]
mov dword [esp + 0x14], ecx
xor eax, eax
jmp 0x416850
movzx ecx, word [esp + eax + 0xd6]
mov word [esp + eax + 0x7a8], cx
add eax, 2
cmp cx, bx
jne 0x416850
movzx edx, word [esp + 0x156]
mov ebp, dword [esp + 0x1f8]
lea eax, [esp + 0x1b8]
push eax
push 0x10
lea ecx, [esp + 0x690]
mov dword [esp + 0x20], edx
push ecx
jmp 0x41693f
cmp dword [0x4260c0], 3
jne 0x416947
push 0x236
lea edx, [esp + 0x234]
push ebx
push edx
call fcn.004054f0
add esp, 0xc
lea esi, [esp + 0x230]
call fcn.00417fd0
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x416947
xor eax, eax
nop
movzx ecx, word [esp + eax + 0x33e]
mov word [esp + eax + 0x728], cx
add eax, 2
cmp cx, bx
jne 0x4168d0
mov ecx, dword [esp + 0x336]
lea esi, [esp + 0x6a8]
call fcn.00415130
movzx eax, word [esp + 0x33a]
mov ecx, dword [esp + 0x330]
lea esi, [esp + 0x7a8]
mov dword [esp + 0x14], eax
call fcn.00415130
movzx ecx, word [esp + 0x334]
mov ebp, dword [esp + 0x238]
lea edx, [esp + 0x35e]
push edx
push 0x10
lea eax, [esp + 0x670]
mov dword [esp + 0x20], ecx
push eax
call fcn.00401201
add esp, 0xc
mov edi, dword [esp + 0x2c]
cmp edi, ebx
je 0x416a70
xor eax, eax
jmp 0x416960
movzx ecx, word [esp + eax + 0x4ee]
mov word [esp + eax + 0x728], cx
add eax, 2
cmp cx, bx
jne 0x416960
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x46c]
mov word [esp + eax + 0x6a8], cx
add eax, 2
cmp cx, bx
jne 0x416980
movzx ecx, word [esp + 0x4ec]
mov dword [esp + 0x14], ecx
xor eax, eax
jmp 0x4169b0
movzx ecx, word [eax + 0x4231b8]
mov word [esp + eax + 0x7a8], cx
add eax, 2
cmp cx, bx
jne 0x4169b0
cmp dword [0x4260c0], 3
movzx edx, word [esp + 0x58e]
mov dword [esp + 0x18], edx
mov ebp, 5
je 0x4169f6
lea eax, [esp + 0xc38]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
jmp 0x416a23
push 0x104
lea ecx, [esp + 0xc3c]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
push 0x422ff4
lea edx, [esp + 0xc3c]
push 0x104
push edx
call fcn.00401187
add esp, 0xc
xor eax, eax
jmp 0x416a30
movzx ecx, word [esp + eax + 0xc38]
mov word [esp + eax + 0x1048], cx
add eax, 2
cmp cx, bx
jne 0x416a30
push 0x4231d4
lea eax, [esp + 0x104c]
push 0x104
push eax
call fcn.00401187
add esp, 0xc
lea ecx, [esp + 0x1048]
push ecx
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push 0x200
lea edx, [esp + 0x34]
push ebx
push edx
call fcn.004054f0
mov esi, 0x504d534d
add esp, 0xc
mov dword [esp + 0x30], esi
mov word [esp + 0xb4], 0x51
xor eax, eax
jmp 0x416aa0
movzx ecx, word [eax + 0x4231ec]
mov word [esp + eax + 0x34], cx
add eax, 2
cmp cx, bx
jne 0x416aa0
mov word [esp + 0x156], 0x2b66
xor eax, eax
movzx ecx, word [eax + 0x423208]
mov word [esp + eax + 0xd6], cx
add eax, 2
cmp cx, bx
jne 0x416ac0
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x423224]
mov word [esp + eax + 0xb6], cx
add eax, 2
cmp cx, bx
jne 0x416ae0
cmp dword [esp + 0x28], ebx
mov dword [esp + 0x1f8], 5
jne 0x416b16
cmp dword [esp + 0x24], ebx
jne 0x416b16
cmp edi, ebx
je 0x416b91
lea eax, [esp + 0x728]
push eax
lea ecx, [esp + 0xba]
push 0x10
push ecx
call fcn.00401201
add esp, 0xc
lea edx, [esp + 0x6a8]
push edx
lea eax, [esp + 0x38]
push 0x40
push eax
call fcn.00401201
movzx ecx, word [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x7a8]
push edx
lea eax, [esp + 0xda]
push 0x40
push eax
mov word [esp + 0xc0], cx
call fcn.00401201
movzx ecx, word [esp + 0x24]
add esp, 0xc
cmp ebp, ebx
mov word [esp + 0x156], cx
mov dword [esp + 0x1f8], ebp
jne 0x416b91
mov dword [esp + 0x1f8], 5
cmp word [esp + 0x34], bx
je 0x416e46
cmp word [esp + 0xb4], bx
jbe 0x416e46
mov ebp, dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [esp + 0x30], esi
call ebp
push eax
call fcn.00401d14
add esp, 4
push 0x7fe
lea edx, [esp + 0x145e]
push ebx
push edx
mov word [esp + 0x1464], bx
call fcn.004054f0
add esp, 0xc
cmp word [esp + 0x158], bx
jne 0x416c11
lea eax, [esp + 0x1458]
push eax
call fcn.00415390
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x15c]
push 0x10
push edx
call fcn.00401201
add esp, 0xc
cmp word [esp + 0x178], bx
jne 0x416c45
lea eax, [esp + 0x1458]
push eax
call fcn.00415390
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x17c]
push 0x10
push edx
call fcn.00401201
add esp, 0xc
cmp word [esp + 0x1b8], bx
jne 0x416c79
lea eax, [esp + 0x1458]
push eax
call fcn.00415390
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x1bc]
push 0x10
push edx
call fcn.00401201
add esp, 0xc
cmp word [esp + 0x1d8], bx
jne 0x416ce2
lea eax, [esp + 0x1458]
push eax
call fcn.00415390
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x1dc]
push 0x10
push edx
call fcn.00401201
lea eax, [esp + 0x674]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x416cb7
sub eax, edx
sar eax, 1
je 0x416ce2
lea eax, [esp + 0x668]
push eax
lea ecx, [esp + 0x1dc]
push 0x10
push ecx
call fcn.00401201
add esp, 0xc
lea eax, [esp + 0x688]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x416cf0
sub eax, edx
sar eax, 1
je 0x416d1b
lea edx, [esp + 0x688]
push edx
lea eax, [esp + 0x19c]
push 0x10
push eax
call fcn.00401201
add esp, 0xc
cmp word [esp + 0x198], bx
jne 0x416d4f
lea ecx, [esp + 0x1458]
push ecx
call fcn.00415390
add esp, 4
lea edx, [esp + 0x1458]
push edx
lea eax, [esp + 0x19c]
push 0x10
push eax
call fcn.00401201
add esp, 0xc
cmp dword [esp + 0x1f8], ebx
mov dword [esp + 0x1fc], 0x1000213
jne 0x416d6e
mov dword [esp + 0x1f8], 5
lea ecx, [esp + 0x30]
push ecx
call fcn.0040e060
add esp, 4
test eax, eax
je 0x416e46
lea edi, [esp + 0x828]
lea esi, [esp + 0x1d8]
call fcn.00414eb0
call ebp
push eax
call fcn.00401d14
add esp, 4
push 0x32
mov eax, 0x64
call fcn.004152b0
add esp, 4
push eax
mov edx, edi
push edx
lea eax, [esp + 0x1258]
call fcn.00415a40
add esp, 8
lea eax, [esp + 0x1c]
push eax
push 3
push ebx
push 0x4232a0
push closesocket
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x416e2e
mov eax, edi
lea edx, [eax + 2]
jmp 0x416df0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x416df0
sub eax, edx
sar eax, 1
lea ecx, [eax + eax + 2]
mov eax, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x82c]
push edx
push 1
push ebx
push 0x42330c
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x416e2e
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
push ebx
push 0x423314
lea edx, [esp + 0x834]
push edx
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, 1
mov ecx, dword [esp + 0x1c5c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00401148
add esp, 0x1c54
ret