Function at 0x407580
Capabilities:
Create process on windows
Create thread
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x42a004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x105
call fcn.00413e95
add esp, 4
mov dword [ebp - 0x54], eax
test eax, eax
je 0x407593
push 0x104
mov edi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4075ce
mov eax, dword [0x42b128]
mov ecx, dword [eax]
mov edx, edi
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x4075c4
call fcn.00409960
lea ecx, [ebp - 0x40]
push ecx
push eax
call fcn.00413804
add esp, 8
test eax, eax
je 0x40761e
call fcn.00409960
push eax
call fcn.004153f9
add esp, 4
call fcn.00409960
push eax
call fcn.004095c0
add esp, 4
call fcn.00409960
push 0
push eax
call fcn.00409300
add esp, 8
call fcn.00409960
push 6
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call fcn.00409960
push eax
call fcn.0041542b
add esp, 4
call fcn.00409dc0
mov ecx, edi
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x407653
test dl, dl
je 0x40764f
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x407653
add ecx, 2
add eax, 2
test dl, dl
jne 0x407633
xor eax, eax
jmp 0x407658
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40770f
call fcn.00409dc0
lea edx, [ebp - 0x40]
push edx
push eax
call fcn.00413804
add esp, 8
test eax, eax
jne 0x407684
call fcn.00409dc0
push eax
call fcn.0041405a
add esp, 4
push 0x29
call fcn.00404a40
mov eax, dword [0x42c160]
mov ecx, dword [eax + 0xa4]
add esp, 4
mov eax, edi
call fcn.00402cc0
test al, al
je 0x4076cf
push 0x29
call fcn.00404a40
mov ecx, dword [0x42c160]
mov esi, dword [ecx + 0xa4]
add esp, 4
push 1
call fcn.00409dc0
push eax
push esi
mov eax, edi
call fcn.004031c0
add esp, 0xc
jmp 0x4076df
call fcn.00409dc0
push eax
mov eax, edi
call fcn.00401090
add esp, 4
call fcn.00409dc0
mov esi, eax
push 0x425550
push esi
call fcn.00412efb
add esp, 8
test eax, eax
je 0x407701
push esi
call fcn.004025c0
add esp, 4
call fcn.00409dc0
push eax
call fcn.004095c0
add esp, 4
call fcn.004096d0
cmp eax, 2
je 0x407753
call fcn.00404150
push 0
push 0
push 0
cmp eax, 0x3c
jl 0x40773f
push 0x408600
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x42c370], eax
jmp 0x407753
push 0x408470
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x42c164], eax
call fcn.004096d0
cmp eax, 1
jne 0x4077f8
call fcn.00409dc0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407770
sub eax, edx
lea ebx, [eax + 0x11]
lea esp, [esp]
push ebx
call fcn.00413e95
mov esi, eax
add esp, 4
test esi, esi
je 0x407780
push 0x7b
call fcn.00404a40
mov edx, dword [0x42c160]
mov eax, dword [edx + 0x1ec]
add esp, 4
push eax
call fcn.00409dc0
push eax
push str.__s___s
push esi
call fcn.00413fd6
push 0x44
lea eax, [ebp - 0x50]
push 0
push eax
call fcn.00417250
add esp, 0x1c
xor eax, eax
lea ecx, [ebp - 0x64]
push ecx
lea edx, [ebp - 0x50]
push edx
push eax
push eax
push 0x100
push eax
push eax
push eax
push esi
push eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push esi
call fcn.00413e5b
add esp, 4
call fcn.00409dc0
mov ecx, edi
nop
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x407820
test dl, dl
je 0x40781c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x407820
add ecx, 2
add eax, 2
test dl, dl
jne 0x407800
xor eax, eax
jmp 0x407825
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x407950
call fcn.00409dc0
lea ecx, [ebp - 0x40]
push ecx
push eax
call fcn.00413804
add esp, 8
test eax, eax
jne 0x407950
mov eax, dword [0x42c3f0]
test eax, eax
je 0x40785c
cmp eax, 0xffffffff
je 0x40785c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00409dc0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407864
sub eax, edx
lea esi, [eax + 0x11]
push esi
call fcn.00413e95
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407870
call fcn.00409dc0
push eax
push str.__s_
push ebx
call fcn.00413fd6
add esp, 0xc
call fcn.004096d0
test eax, eax
jne 0x4078f9
lea edi, [ebx - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4078a0
mov dx, word [0x427cc4]
push 0x7b
mov word [edi], dx
call fcn.00404a40
mov eax, dword [0x42c160]
mov eax, dword [eax + 0x1ec]
add esp, 4
mov esi, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4078d0
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4078e0
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]
mov edi, dword [ebp - 0x54]
push 0x44
lea ecx, [ebp - 0x50]
push 0
push ecx
call fcn.00417250
add esp, 0xc
xor eax, eax
lea edx, [ebp - 0x64]
push edx
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x50]
push eax
push 0
push 0
push 0x100
push 0
push 0
push 0
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push ebx
call fcn.00413e5b
add esp, 4
push edi
call fcn.00413e5b
add esp, 4
push 0
call fcn.0041443c
push edi
call fcn.00413e5b
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412e08
mov esp, ebp
pop ebp
ret