Function at 0x402040
Capabilities:
Create thread
Set console window title

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4056e8
mov eax, dword fs:[0]
push eax
sub esp, 0x100
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push 0
push 0xffffffffffffffff
push str.SNAILYT_BGMI
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov edi, eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040464d
add esp, 4
mov esi, eax
push edi
push esi
push 0xffffffffffffffff
push str.SNAILYT_BGMI
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
push esi
call fcn.0040460a
push 0xb8
lea eax, [ebp - 0x10c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 4
lea ecx, [ebp - 0x10c]
push str.filesMuMuPlayer.txt
call fcn.00402f50
mov dword [ebp - 4], 0
cmp dword [ebp - 0xb0], 0
jne 0x402122
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_open_exelocation.txt
push 0x403750
call fcn.00403530
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov esi, 1
jmp 0x402406
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x3c], xmm0
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
push 0xa
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_char___thiscall_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const]
movzx eax, al
lea edx, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x10c]
call fcn.00403e30
add esp, 4
lea ecx, [ebp - 0xfc]
call fcn.004034a0
test eax, eax
jne 0x402192
push eax
mov eax, dword [ebp - 0x10c]
lea ecx, [ebp - 0x10c]
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_]
cmp dword [ebp - 0x28], 0xf
lea ecx, [ebp - 0x3c]
mov edi, dword [ebp - 0x2c]
jbe 0x4021a5
mov esi, dword [ebp - 0x3c]
add edi, esi
jmp 0x4021aa
add edi, ecx
lea esi, [ebp - 0x3c]
mov dword [ebp - 0x44], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x54], xmm0
cmp esi, edi
jne 0x4021ce
xor eax, eax
mov dword [ebp - 0x40], 7
mov word [ebp - 0x54], ax
jmp 0x4022bf
sub edi, esi
mov eax, 7
mov dword [ebp - 0x40], eax
cmp edi, 0x7ffffffe
ja 0x402455
cmp edi, eax
jbe 0x402282
mov eax, edi
or eax, 7
cmp eax, 0x7ffffffe
jbe 0x402208
mov ecx, 0x7fffffff
mov dword [ebp - 0x14], 0x7ffffffe
add ecx, ecx
jmp 0x40222e
mov ecx, 0xa
cmp eax, ecx
cmovb eax, ecx
mov dword [ebp - 0x14], eax
lea ecx, [eax + 1]
cmp ecx, 0x7fffffff
ja 0x40245a
add ecx, ecx
cmp ecx, 0x1000
jb 0x40225e
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x40245a
push eax
call fcn.0040460f
add esp, 4
test eax, eax
je 0x4023e8
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ebp - 0x54], ecx
mov dword [ecx - 4], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
jmp 0x402285
test ecx, ecx
je 0x402278
push ecx
call fcn.0040460f
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x40], eax
jmp 0x402285
xor ecx, ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x54], ecx
jmp 0x402285
mov ecx, dword [ebp - 0x54]
cmp eax, 7
lea edx, [ebp - 0x54]
cmova edx, ecx
mov dword [ebp - 0x14], edx
mov ecx, edx
mov edx, edi
test edi, edi
je 0x4022b3
nop dword [eax]
movsx ax, byte [esi]
lea ecx, [ecx + 2]
lea esi, [esi + 1]
mov word [ecx - 2], ax
sub edx, 1
jne 0x4022a0
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov dword [ebp - 0x44], edi
mov word [eax + edi*2], cx
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 2
push eax
push ecx
lea ecx, [ebp - 0x24]
call fcn.004041d0
push 4
mov byte [ebp - 4], 3
call fcn.0040460f
mov dword [ebp - 0x14], eax
mov dword [eax], 0x401c10
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
push ecx
push 0
push eax
push 0x404510
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x1c
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x402446
mov byte [ebp - 4], 5
cmp dword [ebp - 0x20], 0
je 0x40243e
mov esi, dword [sym.imp.MSVCP140.dll__Thrd_id]
call esi
mov ecx, dword [ebp - 0x20]
cmp ecx, eax
je 0x402436
mov edi, dword [sym.imp.MSVCP140.dll__Thrd_join]
push 0
push ecx
push dword [ebp - 0x24]
call edi
add esp, 0xc
test eax, eax
jne 0x40242e
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
cmp dword [ebp - 0x18], eax
je 0x40243e
call esi
mov ecx, dword [ebp - 0x18]
cmp ecx, eax
je 0x402436
push 0
push ecx
push dword [ebp - 0x1c]
call edi
add esp, 0xc
test eax, eax
jne 0x40242e
xor esi, esi
xorps xmm0, xmm0
movlpd qword [ebp - 0x1c], xmm0
cmp dword [ebp - 0x20], esi
je 0x40238c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
mov ecx, dword [ebp - 0x40]
cmp ecx, 7
jbe 0x4023c2
mov edx, dword [ebp - 0x54]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4023b8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4023e8
push ecx
push edx
call fcn.0040463f
add esp, 8
mov ecx, dword [ebp - 0x28]
cmp ecx, 0xf
jbe 0x4023f8
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4023ee
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4023ee
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0040463f
add esp, 8
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], 0
lea ecx, [ebp - 0x10c]
call fcn.00401b50
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004045fc
mov esp, ebp
pop ebp
ret
push 2
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push 5
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push 1
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push 6
mov dword [ebp - 0x18], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
call fcn.00401170
call fcn.004010d0
int3