Function at 0x402595
Capabilities:
Allocate thread local storage
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x40c018]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x40c45c], edi
jne 0x402a95
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x40c424], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x40c074], eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x64]
push eax
mov dword [esp + 0x4c], 0x100
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea eax, [esp + 0x60]
push str.yboxrunner
push eax
call dword [sym.imp.MSVCR100.dll_wcscmp]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
neg eax
pop ecx
sbb eax, eax
pop ecx
inc eax
push str.libtcmalloc.dll
mov dword [0x40c428], eax
call ebx
push 0x1e
lea ecx, [esp + 0x30]
mov dword [0x40c42c], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
call fcn.00402afb
lea eax, [esp + 0x18]
lea esi, [esp + 0x2c]
mov dword [esp + 0x18], 0x402cf3
call fcn.00402aaf
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x402cbc
call fcn.00402aaf
push str.ntdll.dll
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.LdrUnloadDll
push eax
call ebx
mov dword [esp + 0x24], eax
cmp eax, edi
je 0x402685
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
call fcn.00402aaf
jmp 0x402697
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
call fcn.00402aaf
mov edi, dword [0x40c42c]
xor eax, eax
mov byte [esp + 0x13], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
cmp edi, eax
je 0x4028d9
push str.tc_version
push edi
call ebx
lea ecx, [edi + 0xa380]
mov dword [esp + 0x28], ecx
lea ecx, [edi + 0x7270]
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x48]
lea esi, [edi + 0xa0f0]
push ecx
mov dword [esp + 0x24], esi
call eax
add esp, 0xc
lea ecx, [esp + 0x14]
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::constructor_void_]
push 0x100
lea ecx, [esp + 0x18]
call dword [sym.imp.Common.dll_public:_wchar_t____thiscall_CTXStringW::GetBuffer_int_]
push 0x408b88
lea ecx, [esp + 0x18]
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_wchar_t_const__]
cmp dword [esp + 0x40], 2
je 0x402746
push dword [esp + 0x40]
lea eax, [esp + 0x18]
push str.major_2__d_r_n
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::AppendFormat_wchar_t_const__]
add esp, 0xc
cmp dword [esp + 0x3c], 4
je 0x402764
push dword [esp + 0x3c]
lea eax, [esp + 0x18]
push str.minor_4__d_r_n
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::AppendFormat_wchar_t_const__]
add esp, 0xc
push dword [esp + 0x1c]
call dword [sym.imp.MSVCR100.dll_strlen]
pop ecx
test eax, eax
je 0x40278a
push dword [esp + 0x1c]
lea eax, [esp + 0x18]
push str.strlen_patch__0__S_r_n
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::AppendFormat_wchar_t_const__]
add esp, 0xc
mov eax, dword [esi]
cmp eax, 0xa1ec8b55
je 0x4027a7
push eax
lea eax, [esp + 0x18]
push str._DWORD_pfnDoMalloc_0xa1ec8b55__p_r_n
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::AppendFormat_wchar_t_const__]
add esp, 0xc
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
cmp eax, 0x6aec8b55
je 0x4027c8
push eax
lea eax, [esp + 0x18]
push str._DWORD_pfnDoFree_0x6aec8b55__p_r_n
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::AppendFormat_wchar_t_const__]
add esp, 0xc
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
cmp eax, 0x83ec8b55
je 0x4027e9
push eax
lea eax, [esp + 0x18]
push str._DWORD_pfnInvalidSize_0x83ec8b55__p_r_n
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::AppendFormat_wchar_t_const__]
add esp, 0xc
lea eax, [esp + 0x14]
push 0x408b88
push eax
call dword [sym.imp.Common.dll_bool___cdecl_operator_class_CTXStringW_const___wchar_t_const__]
pop ecx
pop ecx
test al, al
je 0x4028cf
push str.tc_malloc_size
push dword [0x40c42c]
mov byte [esp + 0x1b], 1
call ebx
mov dword [0x40c43c], eax
mov dword [esp + 0x58], esi
lea eax, [esp + 0x58]
lea esi, [esp + 0x2c]
call fcn.00402aaf
mov eax, dword [esp + 0x28]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
call fcn.00402aaf
mov eax, dword [esp + 0x20]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
call fcn.00402aaf
lea eax, [edi + 0x70e9]
mov dword [0x40c440], eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
call fcn.00402aaf
lea eax, [edi + 0x7070]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
call fcn.00402aaf
lea eax, [edi + 0xfccf]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
call fcn.00402aaf
mov eax, dword [0x40c42c]
add eax, 0xfcd4
mov dword [0x40c444], eax
lea eax, [edi + 0xf860]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
call fcn.00402aaf
lea eax, [edi + 0xa0da]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
call fcn.00402aaf
mov eax, dword [0x40c42c]
add eax, 0xa0df
mov dword [0x40c448], eax
lea ecx, [esp + 0x14]
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::destructor_void_]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x4c]
call dword [sym.imp.Common.dll_public:_void___thiscall_Util::Misc::CSafeHook::constructor_class_std::vector_void___class_std::allocator_void_____]
cmp dword [esp + 0x24], 0
mov esi, dword [sym.imp.Common.dll_void___cdecl_Util::Misc::DetourFunctionWrapper_unsigned_char___unsigned_char___unsigned_char___]
je 0x402905
push 0x40c420
push 0x401f25
push dword [esp + 0x2c]
jmp 0x402915
push 0x40c41c
push 0x401ca5
push dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
add esp, 0xc
cmp byte [esp + 0x13], 0
je 0x402a1b
push 0x40c430
push 0x4021be
push dword [esp + 0x20]
call esi
add esp, 0xc
push 0x40c434
push 0x402253
push dword [esp + 0x30]
call esi
add esp, 0xc
push 0x40c438
push 0x4022ed
push dword [esp + 0x28]
call esi
mov eax, dword [0x40c440]
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [esp + 0x28], 0
mov ecx, 0x402374
sub ecx, eax
sub ecx, 5
add esp, 0xc
mov dword [esp + 0x59], ecx
lea ecx, [esp + 0x1c]
push ecx
push 5
lea ecx, [esp + 0x60]
push ecx
push eax
mov byte [esp + 0x68], 0xe9
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, 0x402444
sub eax, edi
sub eax, 0xa0df
mov dword [esp + 0x59], eax
lea eax, [esp + 0x1c]
push eax
push 5
lea eax, [esp + 0x60]
push eax
lea eax, [edi + 0xa0da]
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, 0x4023d7
sub eax, edi
sub eax, 0xfcd4
mov dword [esp + 0x59], eax
lea eax, [esp + 0x1c]
push eax
push 5
lea eax, [esp + 0x60]
push eax
lea eax, [edi + 0xfccf]
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x40c44c
lea eax, [edi + 0x7070]
push 0x40245e
push eax
call esi
add esp, 0xc
push 0x40c450
push 0x4024c0
add edi, 0xf860
push edi
call esi
add esp, 0xc
push 0x40c454
push 0x40251a
push 0x402cf3
call esi
add esp, 0xc
push 0x40c458
push 0x402554
push 0x402cbc
call esi
add esp, 0xc
cmp dword [esp + 0x24], 0
je 0x402a5a
push 0x40c420
push 0x401f25
push dword [esp + 0x2c]
jmp 0x402a6a
push 0x40c41c
push 0x401ca5
push dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
add esp, 0xc
lea ecx, [esp + 0x48]
mov dword [0x40c45c], 1
call dword [sym.imp.Common.dll_public:_void___thiscall_Util::Misc::CSafeHook::destructor_void_]
cmp dword [esp + 0x2c], 0
je 0x402a95
push dword [esp + 0x2c]
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
pop ecx
mov ecx, dword [esp + 0x264]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 0x40c4e4
call fcn.004073f8
mov esp, ebp
pop ebp
ret