Function at 0x404170
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x406ec9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x18], esi
or eax, 0xffffffff
xor ebp, ebp
mov dword [esi + 0x18], eax
mov dword [esp + 0x28], ebp
mov dword [esi], 0x4082a4
mov dword [esi + 0xc], ebp
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0x10], ebp
mov al, byte [esp + 0x30]
lea ebx, [esi + 0x28]
push ebp
mov ecx, ebx
mov byte [esp + 0x2c], 1
mov byte [ebx], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov cl, byte [esp + 0x30]
lea edi, [esi + 0x38]
push ebp
mov byte [esp + 0x2c], 2
mov byte [edi], cl
mov ecx, edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov dl, byte [esp + 0x30]
lea ebp, [esi + 0x50]
push 0
mov ecx, ebp
mov byte [esp + 0x2c], 3
mov byte [ebp], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [esp + 0x30]
lea ecx, [esi + 0x60]
push 0
mov byte [esp + 0x2c], 4
mov byte [ecx], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push str.KVSACreateVAPIServices
mov byte [esp + 0x2c], 5
mov dword [esi], 0x40831c
mov dword [esi + 8], 3
call sub.MSVCRT.dll_strlen
add esp, 4
mov ecx, ebx
mov dword [esp + 0x10], eax
push 1
push eax
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x404265
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 4]
push ecx
push str.KVSACreateVAPIServices
push eax
call sub.MSVCRT.dll_memcpy
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov ecx, ebx
push edx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
push str.kvutil
call sub.MSVCRT.dll_strlen
add esp, 4
mov ecx, edi
mov dword [esp + 0x10], eax
push 1
push eax
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4042a8
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 4]
push ecx
push str.kvutil
push eax
call sub.MSVCRT.dll_memcpy
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov ecx, edi
push edx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
push 0x38
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x28], 6
je 0x404317
mov al, byte [edi]
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0
mov dword [esp + 0x24], ecx
mov byte [ecx], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x20]
push edx
push 0
push edi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
sub esp, 0x10
lea eax, [esp + 0x50]
mov ecx, esp
mov dword [esp + 0x30], esp
push eax
mov byte [esp + 0x4c], 7
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, dword [esp + 0x34]
mov byte [esp + 0x48], 6
call fcn.00401350
jmp 0x404319
xor eax, eax
test eax, eax
mov byte [esp + 0x28], 5
mov dword [esi + 0x48], eax
je 0x404381
mov cl, byte [ebx]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x2c], esp
push 0
mov byte [edi], cl
mov ecx, edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, edi
mov eax, dword [edx]
push eax
push 0
push ebx
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, dword [esi + 0x48]
call fcn.00401650
test eax, eax
je 0x404378
mov ecx, dword [esp + 0x34]
test ecx, ecx
jne 0x40436a
mov ecx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push ecx
push 0
push 0
call eax
mov dword [esi + 0x4c], eax
jmp 0x404388
mov dword [esi + 0x74], 0
jmp 0x404388
mov dword [esi + 0x4c], 0
push str.adGetADservices
call sub.MSVCRT.dll_strlen
add esp, 4
mov edi, eax
mov ecx, ebp
push 1
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4043c3
mov eax, dword [ebp + 4]
push edi
push str.adGetADservices
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp + 4]
add esp, 0xc
add eax, edi
mov dword [ebp + 8], edi
mov byte [eax], 0
push str.kwad
call sub.MSVCRT.dll_strlen
add esp, 4
mov ebx, eax
lea edi, [esi + 0x60]
push 1
push ebx
mov ecx, edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x404401
mov eax, dword [edi + 4]
push ebx
push str.kwad
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi + 4]
add esp, 0xc
add eax, ebx
mov dword [edi + 8], ebx
mov byte [eax], 0
push 0x38
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x14], eax
xor edx, edx
mov byte [esp + 0x28], 8
cmp eax, edx
je 0x40446f
mov cl, byte [edi]
sub esp, 0x10
mov ebx, esp
mov dword [esp + 0x2c], esp
push edx
mov byte [ebx], cl
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, ebx
mov eax, dword [edx]
push eax
push 0
push edi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
sub esp, 0x10
lea edx, [esp + 0x50]
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
mov byte [esp + 0x4c], 9
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, dword [esp + 0x34]
mov byte [esp + 0x48], 8
call fcn.00401350
xor edx, edx
jmp 0x404471
xor eax, eax
mov ecx, dword [esi + 0x4c]
mov byte [esp + 0x28], 5
cmp ecx, edx
mov dword [esi + 0x70], eax
je 0x40453f
cmp eax, edx
je 0x40453f
mov al, byte [ebp]
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x2c], esp
mov byte [ecx], al
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [eax]
push eax
push edx
push ebp
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, dword [esi + 0x70]
call fcn.00401650
xor ebx, ebx
cmp eax, ebx
je 0x4044cc
mov ecx, dword [esi + 0x4c]
push ecx
call eax
mov dword [esi + 0x74], eax
jmp 0x4044cf
mov dword [esi + 0x74], ebx
push str.kwAutoDetEx
call sub.MSVCRT.dll_strlen
add esp, 4
mov edi, eax
mov ecx, ebp
push 1
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x404509
mov edx, dword [ebp + 4]
push edi
push str.kwAutoDetEx
push edx
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp + 4]
mov dword [ebp + 8], edi
add esp, 0xc
mov byte [eax + edi], 0
mov dl, byte [ebp]
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x2c], esp
mov byte [ecx], dl
mov dword [ecx + 4], ebx
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], ebx
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [eax]
push edx
push ebx
push ebp
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, dword [esi + 0x70]
call fcn.00401650
mov dword [esi + 0x78], eax
xor edx, edx
jmp 0x404545
mov dword [esi + 0x74], edx
mov dword [esi + 0x78], edx
mov ecx, dword [esp + 0x34]
cmp ecx, edx
je 0x404569
mov al, byte [ecx - 1]
test al, al
je 0x40455f
cmp al, 0xff
je 0x40455f
dec al
mov byte [ecx - 1], al
jmp 0x404569
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [esp + 0x20]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1c
ret 0x10