Function at 0x403ea0
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Create process suspended
Resume thread
Terminate process

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a970
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x250
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 8]
push 0x800
push 0x40f7c8
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4048c4
push 0x40f7c8
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x40f7c8
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push str.config.ini
push 0x40f7c8
push 0x40e7c8
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
xorps xmm0, xmm0
mov dword [ebp - 0x50], 0
push 0x2c
movlpd qword [ebp - 0x58], xmm0
movlpd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x70], vtable.INI::File.0
mov dword [ebp - 0x68], 0
call fcn.00409950
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
push 0xb8
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x178]
push 0
push eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0xf
call sub.VCRUNTIME140.dll_memset
push ecx
lea ecx, [ebp - 0x178]
call fcn.00405860
cmp dword [ebp - 0x11c], 0
push 0
je 0x404984
push 0x40b2f0
lea ecx, [ebp - 0x1f4]
mov dword [ebp - 0x20c], 0
mov dword [ebp - 0x1fc], 0
mov dword [ebp - 0x1f8], 0xf
mov dword [ebp - 0x1f4], 0
mov dword [ebp - 0x1e4], 0
mov dword [ebp - 0x1e0], 0xf
call fcn.00406720
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x1f4]
push eax
lea eax, [ebp - 0x178]
push eax
lea ecx, [ebp - 0x70]
call fcn.00402270
mov ecx, dword [ebp - 0x1e0]
cmp ecx, 0x10
jb 0x404081
mov edx, dword [ebp - 0x1f4]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404077
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x404077
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00409980
add esp, 8
mov ecx, dword [ebp - 0x1f8]
cmp ecx, 0x10
jb 0x4040bd
mov edx, dword [ebp - 0x20c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4040b3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4040b3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00409980
add esp, 8
cmp dword [ebp - 0x11c], 0
je 0x40416d
mov eax, dword [ebp - 0x15c]
lea ecx, [ebp - 0x12c]
cmp dword [eax], ecx
jne 0x4040fa
mov edx, dword [ebp - 0x114]
mov ecx, dword [ebp - 0x118]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebp - 0x14c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x13c]
mov dword [eax], edx
lea esi, [ebp - 0x168]
mov ecx, esi
call fcn.00406380
push dword [ebp - 0x11c]
xor ecx, ecx
test al, al
cmove esi, ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor ecx, ecx
add esp, 4
test eax, eax
mov byte [ebp - 0x120], cl
mov byte [ebp - 0x12b], cl
cmovne esi, ecx
lea ecx, [ebp - 0x168]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x40e7bc]
mov ecx, dword [0x40e7c0]
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x130], 0
test esi, esi
jne 0x4041cb
jmp 0x4041b2
lea ecx, [ebp - 0x168]
mov byte [ebp - 0x120], 0
mov byte [ebp - 0x12b], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x40e7bc]
mov ecx, dword [0x40e7c0]
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x130], 0
mov eax, dword [ebp - 0x178]
lea ecx, [ebp - 0x178]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
xorps xmm0, xmm0
mov dword [ebp - 0xb8], 0
movlpd qword [ebp - 0xac], xmm0
mov dword [ebp - 0xa4], 0
movlpd qword [ebp - 0x94], xmm0
mov dword [ebp - 0x8c], 0
mov byte [ebp - 0x75], 0
mov dword [ebp - 0xc0], vtable.std::wstring_convert_class_std::codecvt_utf8_wchar_t__1114111__0___wchar_t__class_std::allocator_wchar_t___class_std::allocator_char__.0
push 1
mov dword [ebp - 4], 0
call dword [sym.imp.MSVCP140.dll_private:_static_class_std::locale::_Locimp____cdecl_std::locale::_Init_bool_]
mov dword [ebp - 4], 0xffffffff
add esp, 4
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xa0], 0
push 0x34
mov dword [ebp - 0x9c], 0xf
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 7
mov word [ebp - 0x78], 0
mov byte [ebp - 0x76], 0
call fcn.00409950
add esp, 4
mov esi, eax
mov ecx, esi
push 0
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::codecvt_wchar_t__char__struct__Mbstatet_::constructor_unsigned_int_]
mov dword [esi], vtable.std::codecvt_utf8_wchar_t__1114111__0_.0
xorps xmm0, xmm0
push dword [ebp - 0xb4]
movlpd qword [ebp - 0x80], xmm0
mov dword [ebp - 0xbc], esi
call dword [sym.imp.MSVCP140.dll_private:_static_class_std::locale::_Locimp____cdecl_std::locale::_Locimp::_New_Locimp_class_std::locale::_Locimp_const__]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::locale::id_std::codecvt_wchar_t__char__struct__Mbstatet_::id]
add esp, 4
mov edi, eax
call dword [sym.imp.MSVCP140.dll_public:_unsigned_int___thiscall_std::locale::id::operator_unsigned_int_void_]
push eax
push esi
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_private:_void___thiscall_std::locale::_Locimp::_Addfac_class_std::locale::facet___unsigned_int_]
push 0x40b300
lea ecx, [edi + 0x18]
mov dword [edi + 0x10], 0
call dword [sym.imp.MSVCP140.dll_public:_class_std::_Yarn_char_____thiscall_std::_Yarn_char_::operator_char_const__]
mov ecx, dword [ebp - 0xb4]
cmp ecx, edi
je 0x4042ff
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x4042f2
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov dword [ebp - 0xb4], edi
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x404314
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push 6
push str.Target
lea ecx, [ebp - 0x1dc]
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x1dc], 0
mov dword [ebp - 0x1cc], 0
mov dword [ebp - 0x1c8], 0xf
call fcn.00406720
push 0xf
push str.StartupSettings
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x20c], 0
mov dword [ebp - 0x1fc], 0
mov dword [ebp - 0x1f8], 0xf
call fcn.00406720
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x23c], 0
push eax
lea ecx, [ebp - 0x70]
call fcn.00401940
mov esi, dword [ebp - 0x1dc]
mov dword [ebp - 0x214], eax
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x1c4], eax
mov edi, dword [eax + 4]
cmp byte [edi + 0xd], 0
jne 0x404474
nop word [eax + eax]
cmp dword [ebp - 0x1c8], 0x10
lea ecx, [ebp - 0x1dc]
lea edx, [edi + 0x10]
cmovae ecx, esi
cmp dword [edi + 0x24], 0x10
jb 0x4043dc
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0x20]
mov esi, eax
cmp dword [ebp - 0x1cc], eax
mov dword [ebp - 0x210], eax
cmovb esi, dword [ebp - 0x1cc]
sub esi, 4
jb 0x404411
nop dword [eax]
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x404416
add edx, 4
add ecx, 4
sub esi, 4
jae 0x404400
cmp esi, 0xfffffffc
je 0x40444a
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x404443
cmp esi, 0xfffffffd
je 0x40444a
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x404443
cmp esi, 0xfffffffe
je 0x40444a
mov al, byte [edx + 2]
cmp al, byte [ecx + 2]
jne 0x404443
cmp esi, 0xffffffff
je 0x40444a
mov al, byte [edx + 3]
cmp al, byte [ecx + 3]
je 0x40444a
sbb eax, eax
or eax, 1
jmp 0x40444c
xor eax, eax
test eax, eax
je 0x4044fa
js 0x40450c
mov eax, edi
mov edi, dword [edi]
mov dword [ebp - 0x1c4], eax
cmp byte [edi + 0xd], 0
mov esi, dword [ebp - 0x1dc]
je 0x4043c0
cmp byte [eax + 0xd], 0
jne 0x40452a
cmp dword [eax + 0x24], 0x10
lea ecx, [eax + 0x10]
jb 0x40448a
mov ecx, dword [eax + 0x10]
cmp dword [ebp - 0x1c8], 0x10
lea edx, [ebp - 0x1dc]
mov edi, dword [eax + 0x20]
cmovae edx, esi
mov esi, dword [ebp - 0x1cc]
cmp edi, esi
cmovb esi, edi
sub esi, 4
jb 0x4044c1
nop dword [eax]
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x4044c6
add edx, 4
add ecx, 4
sub esi, 4
jae 0x4044b0
cmp esi, 0xfffffffc
je 0x40451a
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x4044f3
cmp esi, 0xfffffffd
je 0x40451a
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x4044f3
cmp esi, 0xfffffffe
je 0x40451a
mov al, byte [edx + 2]
cmp al, byte [ecx + 2]
jne 0x4044f3
cmp esi, 0xffffffff
je 0x40451a
mov al, byte [edx + 3]
cmp al, byte [ecx + 3]
je 0x40451a
sbb eax, eax
or eax, 1
jmp 0x40451c
mov eax, dword [ebp - 0x1cc]
cmp dword [ebp - 0x210], eax
jae 0x40445a
mov edi, dword [edi + 8]
mov eax, dword [ebp - 0x1c4]
jmp 0x404464
xor eax, eax
test eax, eax
je 0x404750
jns 0x40475c
xor ecx, ecx
mov dword [ebp - 0x218], ecx
test ecx, ecx
mov dword [ebp - 0x25c], 0
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x24c], 0
cmovne eax, ecx
mov dword [ebp - 0x248], 0xf
push eax
lea ecx, [ebp - 0x238]
call fcn.00405db0
mov ecx, dword [ebp - 0x248]
cmp ecx, 0x10
jb 0x4045a1
mov edx, dword [ebp - 0x25c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404597
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40474a
push ecx
push edx
call fcn.00409980
add esp, 8
cmp dword [ebp - 0x224], 0x10
lea ecx, [ebp - 0x238]
mov eax, dword [ebp - 0x228]
cmovae ecx, dword [ebp - 0x238]
add eax, ecx
push eax
push ecx
lea eax, [ebp - 0x1f4]
push eax
lea ecx, [ebp - 0xc0]
call fcn.00405fa0
cmp dword [ebp - 0x1e0], 8
lea eax, [ebp - 0x1f4]
cmovae eax, dword [ebp - 0x1f4]
push eax
push 0x40f7c8
push 0x4107c8
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov ecx, dword [ebp - 0x1e0]
cmp ecx, 8
jb 0x404636
mov edx, dword [ebp - 0x1f4]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40462c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40474a
push ecx
push edx
call fcn.00409980
add esp, 8
mov ecx, dword [ebp - 0x224]
xor eax, eax
mov dword [ebp - 0x1e4], 0
mov dword [ebp - 0x1e0], 7
mov word [ebp - 0x1f4], ax
cmp ecx, 0x10
jb 0x40468d
mov edx, dword [ebp - 0x238]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404683
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40474a
push ecx
push edx
call fcn.00409980
add esp, 8
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], 0
mov dword [ebp - method.INI::Value.virtual_0], vtable.INI::Value.0
mov dword [ebp - method.INI::RefCountPtr_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___.virtual_0], vtable.INI::RefCountPtr_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___.0
call fcn.00406450
lea ecx, [ebp - 0x240]
mov dword [ebp - method.INI::Value.virtual_0], vtable.INI::Value.0
mov dword [ebp - method.INI::RefCountPtr_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___.virtual_0], vtable.INI::RefCountPtr_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___.0
call fcn.00406450
mov ecx, dword [ebp - 0x1f8]
cmp ecx, 0x10
jb 0x40471c
mov edx, dword [ebp - 0x20c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404712
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40474a
push ecx
push edx
call fcn.00409980
add esp, 8
mov eax, dword [ebp - 0x1c8]
cmp eax, 0x10
jb 0x404794
mov edx, dword [ebp - 0x1dc]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x40478a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40478a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp dword [ebp - 0x1cc], edi
jb 0x40452a
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x1c4]
cmp ecx, dword [eax + 0x34]
je 0x40452a
mov ecx, dword [ecx + 0x30]
mov dword [ebp - 0x218], ecx
test ecx, ecx
je 0x404532
inc dword [ecx + 0x18]
jmp 0x404532
push ecx
push edx
call fcn.00409980
add esp, 8
push 0x40
lea eax, [ebp - 0x1bc]
mov dword [ebp - 0x1c0], 0x44
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_CreateProcessW]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x1c4], str.payload.dll
xorps xmm0, xmm0
movups xmmword [ebp - 0x24], xmm0
push eax
lea eax, [ebp - 0x1c0]
push eax
push 0x40f7c8
push 0
push 4
push 0
push 0
push 0
push 0
push 0x4107c8
call esi
test eax, eax
je 0x404839
push ecx
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x1c4]
call fcn.00408520
test eax, eax
jne 0x4048e9
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x1c4]
push esi
push eax
call fcn.00408e80
test eax, eax
jne 0x4048e9
push 0xffffffffffffffff
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call esi
lea ecx, [ebp - 0xc0]
call fcn.00404c80
mov eax, dword [ebp - 0x178]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x178]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x17c], eax
lea ecx, [ebp - 0x168]
call fcn.00405780
lea ecx, [ebp - 0x160]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x70], vtable.INI::File.0
push eax
call fcn.00403bc0
lea ecx, [ebp - 0x64]
call fcn.00403d80
mov eax, dword [ebp - 0x6c]
push dword [eax + 4]
lea eax, [ebp - 0x6c]
push eax
mov ecx, eax
call fcn.00406aa0
push 0x2c
push dword [ebp - 0x6c]
call fcn.00409980
add esp, 8
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
lea ecx, [ebp - 0xc0]
call fcn.00404c80
mov eax, dword [ebp - 0x178]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x178]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x17c], eax
lea ecx, [ebp - 0x168]
call fcn.00405780
lea ecx, [ebp - 0x160]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x70], vtable.INI::File.0
push eax
call fcn.00403bc0
lea ecx, [ebp - 0x64]
call fcn.00403d80
mov eax, dword [ebp - 0x6c]
push dword [eax + 4]
lea eax, [ebp - 0x6c]
push eax
mov ecx, eax
call fcn.00406aa0
push 0x2c
push dword [ebp - 0x6c]
call fcn.00409980
add esp, 8
xor eax, eax
jmp 0x4048c9
push 0x40b358
push 0x40b360
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xffffffffffffffff
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3