Function at 0x4015a0
Capabilities:
Create thread

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x406726
push eax
mov dword fs:[0], esp
sub esp, 0x838
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x90]
test eax, eax
jne 0x4017d8
lea eax, [esp + 0x38]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x640]
lea edx, [esp + 0x440]
push ecx
lea eax, [esp + 0x244]
push edx
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x44]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__wsplitpath]
push str..log
lea eax, [esp + 0x258]
push 0x4090ec
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x58]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__wmakepath]
add esp, 0x28
lea eax, [esp + 0x38]
lea ecx, [esi + 0x98]
push eax
call fcn.004063ee
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_unsigned_short_int__struct_std::char_traits_unsigned_short_int___std::wcout]
mov edi, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_unsigned_short_int__struct_std::char_traits_unsigned_short_int______cdecl_std::operator___class_std::basic_ostream_unsigned_short_int__struct_std::char_traits_unsigned_short_int_____unsigned_short_int_const__]
lea ecx, [esp + 0x38]
push ecx
push 0x4090e0
push edx
call edi
add esp, 8
push eax
call edi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_unsigned_short_int__struct_std::char_traits_unsigned_short_int______cdecl_std::endl_class_std::basic_ostream_unsigned_short_int__struct_std::char_traits_unsigned_short_int____]
add esp, 0xc
lea eax, [esi + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CStringArray::CStringArray
mov dword [esp + 0x848], 0
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40176d
lea edi, [esi + 0x64]
push 1
push 2
mov ecx, edi
call fcn.00405e30
test eax, eax
jne 0x4016d1
lea ecx, [esp + 0xc]
mov dword [esp + 0x848], 0xffffffff
call fcn.004063e2
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x838]
mov dword fs:[0], ecx
add esp, 0x844
ret
lea ecx, [esp + 0x28]
push ecx
push 5
push 0
mov ecx, edi
call fcn.00405d50
push ebx
call dword [sym.imp.SockSv.dll_int___cdecl_SockSv_Init_void_]
push 0
push 0
push esi
push 0x4013f0
push 0
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
lea eax, [esp + 0xc]
lea ecx, [esi + 4]
push eax
call fcn.00405ac0
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push ecx
push eax
lea ecx, [esi + 0x30]
mov byte [esp + 0x854], 1
call fcn.00404a60
test eax, eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x84c], 0
setl bl
call fcn.004063b2
test bl, bl
pop ebx
je 0x4017b0
lea ecx, [esp + 0xc]
mov dword [esp + 0x848], 0xffffffff
call fcn.004063e2
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x838]
mov dword fs:[0], ecx
add esp, 0x844
ret
lea edx, [esp + 0xc]
lea ecx, [esi + 0x64]
push edx
call fcn.00405fb0
test al, al
jne 0x4016e1
lea ecx, [esp + 0xc]
mov dword [esp + 0x848], 0xffffffff
call fcn.004063e2
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x838]
mov dword fs:[0], ecx
add esp, 0x844
ret
lea ecx, [esp + 0xc]
mov dword [esi + 0x94], 0
mov dword [esi + 0x90], 1
mov dword [esp + 0x848], 0xffffffff
call fcn.004063e2
mov ecx, dword [esp + 0x840]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x844
ret