Function at 0x406780
Capabilities:
Create process on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40d3d8
push eax
mov dword fs:[0], esp
sub esp, 0x378
push ebx
mov ebx, dword [esp + 0x38c]
push ebp
push esi
mov esi, ecx
lea ebp, [ebx + ebx*8]
shl ebp, 3
mov eax, dword [esi + 0x78]
mov ecx, dword [eax + ebp + 0x14]
lea eax, [eax + ebp + 0x14]
test ecx, ecx
jne 0x4067c3
xor eax, eax
jmp 0x406a7b
jle 0x4068b7
mov ecx, dword [eax]
dec ecx
mov dword [eax], ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esi + 0x6c]
push str.HLMonitor.ini
lea edx, [esp + 0x30]
push ecx
push edx
mov dword [esp + 0x398], 0
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x390], 1
call fcn.0040b67e
lea ecx, [esp + 0x2c]
mov byte [esp + 0x38c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esi + 0x78]
lea edx, [esp + 0x14]
mov byte [esp + 0x38c], 2
mov ecx, dword [eax + ebp + 0x14]
push ecx
push 0x41155c
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
push ebx
lea eax, [esp + 0x14]
push str.RestartCount_d
push eax
mov byte [esp + 0x398], 3
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add esp, 0xc
push ecx
push edx
push eax
push str.Tasks
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [esp + 0x10]
mov byte [esp + 0x38c], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x38c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esi + 0x78]
lea edx, [esp + 0x184]
push edi
push edx
mov eax, dword [ecx + ebp]
lea ecx, [esp + 0x28c]
push ecx
lea edx, [esp + 0x90]
lea ecx, [esp + 0x34]
push edx
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__splitpath]
add esp, 0x14
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x1c]
push edx
call fcn.0040b6a2
lea eax, [esp + 0x88]
lea ecx, [esp + 0x1c]
push eax
mov dword [esp + 0x394], 4
call sub.MFC42.DLL_CString::operator
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x78]
mov dword [esp + 0x34], 0x44
lea eax, [ecx + ebp]
mov ecx, dword [ecx + ebp + 0x2c]
dec ecx
je 0x406946
dec ecx
je 0x40693d
mov word [esp + 0x64], 1
jmp 0x40694d
mov word [esp + 0x64], 6
jmp 0x40694d
mov word [esp + 0x64], 3
mov edi, dword [esp + 0x60]
push 0x41164c
lea edx, [esp + 0x2c]
or edi, 1
push eax
push edx
mov dword [esp + 0x6c], edi
call sub.MFC42.DLL_operator_2
mov ecx, dword [esi + 0x78]
mov byte [esp + 0x390], 5
lea edx, [ecx + ebp + 4]
push edx
push eax
lea eax, [esp + 0x2c]
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x28]
mov byte [esp + 0x390], 7
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esi + 0x78]
mov eax, dword [ecx + ebp + 0x20]
test eax, eax
je 0x4069ae
push 0x8007
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov edi, eax
jmp 0x4069b2
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x78]
lea eax, [esp + 0x34]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push 0
push 0x20
push 0
push 0
push 0
push edx
push 0
mov byte [esp + 0x3b8], 8
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
mov eax, dword [esi + 0x78]
mov ecx, dword [eax + ebp]
push ecx
je 0x4069fb
push 0x411640
jmp 0x406a00
push 0x411634
lea edx, [esp + 0x18]
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov ecx, esi
push eax
push 2
call fcn.00406bd0
mov ecx, dword [esp + 0x10]
push ecx
push 0x411628
push ebx
mov ecx, esi
call fcn.00406d00
mov edx, dword [esi + 0x78]
mov eax, dword [edx + ebp + 0x20]
test eax, eax
je 0x406a3f
push edi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
lea ecx, [esp + 0x10]
mov byte [esp + 0x390], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x390], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov dword [esp + 0x390], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
pop edi
mov ecx, dword [esp + 0x384]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x384
ret 4