Function at 0x401870
Capabilities:
Check if file exists
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4155ab
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x41e068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xb0], 0x14
cmp dword [ebp + 8], 2
jge 0x4018d4
push str.failed_to_read_arg_n
call fcn.00402f40
add esp, 4
push 1
call fcn.00406a38
add esp, 4
push eax
call fcn.004081bc
add esp, 4
xor eax, eax
jmp 0x401d5a
cmp dword [ebp + 8], 2
jle 0x401914
mov eax, 4
shl eax, 1
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
call fcn.004084fd
add esp, 4
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xac], 1
jle 0x401914
cmp dword [ebp - 0xac], 0x3c
jge 0x401914
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0xb0], eax
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
lea ecx, [ebp - 0x28]
call fcn.00401f00
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.00401df0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401989
push str.failed_to_get_good_path_n
call fcn.00402f40
add esp, 4
push 1
call fcn.00406a38
add esp, 4
push eax
call fcn.004081bc
add esp, 4
mov dword [ebp - 0xb4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00401e70
mov eax, dword [ebp - 0xb4]
jmp 0x401d5a
push str.mp110145.dll
lea ecx, [ebp - 0x70]
call fcn.00401f00
mov byte [ebp - 4], 1
push 0x41bfb8
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x88]
push edx
call fcn.00402710
add esp, 0xc
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp - 0xb8]
mov dword [ebp - 0xbc], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0xbc]
push edx
lea eax, [ebp - 0x58]
push eax
call fcn.004027a0
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x88]
call fcn.00401e70
push str.mp100081.con
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x40]
push edx
call fcn.00402710
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x58]
call fcn.00401df0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401a82
push str.failed_to_find_dll_n
call fcn.00402f40
add esp, 4
push 1
call fcn.00406a38
add esp, 4
push eax
call fcn.004081bc
add esp, 4
mov dword [ebp - 0xc0], 0xfffffffe
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.00401e70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
call fcn.00401e70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00401e70
mov eax, dword [ebp - 0xc0]
jmp 0x401d5a
lea ecx, [ebp - 0x40]
call fcn.00401df0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401afd
push 0x41bfe0
call fcn.00402f40
add esp, 4
push 1
call fcn.00406a38
add esp, 4
push eax
call fcn.004081bc
add esp, 4
mov dword [ebp - 0xc4], 0xfffffffd
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.00401e70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
call fcn.00401e70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00401e70
mov eax, dword [ebp - 0xc4]
jmp 0x401d5a
lea eax, [ebp - 0x58]
push eax
call fcn.00401480
add esp, 4
movzx ecx, al
test ecx, ecx
je 0x401b23
lea edx, [ebp - 0x40]
push edx
call fcn.00401480
add esp, 4
movzx eax, al
test eax, eax
jne 0x401b8b
push str.failed_to_find_config_file_n
call fcn.00402f40
add esp, 4
push 1
call fcn.00406a38
add esp, 4
push eax
call fcn.004081bc
add esp, 4
mov dword [ebp - 0xc8], 0xfffffffc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.00401e70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
call fcn.00401e70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00401e70
mov eax, dword [ebp - 0xc8]
jmp 0x401d5a
lea ecx, [ebp - 0xa4]
call fcn.00401d80
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x70]
push ecx
lea ecx, [ebp - 0xa4]
call fcn.00401e30
mov dword [ebp - 0x8c], 0x41f408
push 0
push 0
lea edx, [ebp - 0xa4]
push edx
push 0x401770
push 0
push 0
call fcn.0040867c
add esp, 0x18
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0
je 0x401ca4
cmp dword [ebp - 0xa8], 0xffffffff
je 0x401ca4
imul eax, dword [ebp - 0xb0], 0x3e8
push eax
mov ecx, dword [ebp - 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x401c3d
push str.failed_to_decode_data__timeout_n
call fcn.00402f40
add esp, 4
push 1
call fcn.00406a38
add esp, 4
push eax
call fcn.004081bc
add esp, 4
push 0
mov edx, dword [ebp - 0xa8]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00401380
mov dword [ebp - 0xcc], eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xa4]
call fcn.00401da0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.00401e70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
call fcn.00401e70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00401e70
mov eax, dword [ebp - 0xcc]
jmp 0x401d5a
push str.failed_to_start_thread_n
call fcn.00402f40
add esp, 4
push 1
call fcn.00406a38
add esp, 4
push eax
call fcn.004081bc
add esp, 4
mov dword [ebp - 0xd0], 0xfffffff5
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xa4]
call fcn.00401da0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.00401e70
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
call fcn.00401e70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00401e70
mov eax, dword [ebp - 0xd0]
jmp 0x401d5a
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403a3f
mov esp, ebp
pop ebp
ret