Function at 0x416170
Capabilities:
Get common file path
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x423410
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x94c
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x58]
xor ebx, ebx
rep stosd dword es:[edi], eax
mov al, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x48], ebx
mov byte [esp + 0x28], 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 edi, 0x42ae98
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42ae98
lea ecx, [esp + 0x2c]
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_char_const___unsigned_int_]
lea ecx, [esp + 0x58]
push 0x104
push ecx
mov dword [esp + 0x96c], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x416417
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x38]
mov byte [esp + 0x38], 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_]
lea edi, [esp + 0x58]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x58]
push ecx
push eax
lea ecx, [esp + 0x3c]
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_char_const___unsigned_int_]
mov edi, str.pub_store.dat
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x964], 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.pub_store.dat
lea ecx, [esp + 0x3c]
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__::append_char_const___unsigned_int_]
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x15d]
mov byte [esp + 0x15c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x38]
cmp eax, ebx
jne 0x416274
mov eax, 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 eax
lea ecx, [esp + 0x160]
push 0x800
push ecx
push 0x42ae84
push str.rand
push str.peerid
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4163eb
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], 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_]
lea edi, [esp + 0x15c]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x18]
push ebx
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 0x4162fc
mov edi, dword [esp + 0x18]
mov ecx, ebx
mov eax, ecx
lea esi, [esp + 0x15c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
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_]
mov esi, dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
lea ecx, [esp + 0x14]
mov bl, 2
push 0x42ae84
push ecx
mov byte [esp + 0x96c], bl
call esi
add esp, 8
test al, al
je 0x4163aa
mov ecx, ebp
call fcn.00416490
lea edx, [esp + 0x48]
push eax
push edx
mov ecx, ebp
call fcn.00415f30
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 byte [esp + 0x964], 3
mov edx, dword [ecx]
lea ecx, [esp + 0x14]
push edx
push 0
push eax
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_]
push 1
lea ecx, [esp + 0x4c]
mov byte [esp + 0x968], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [esp + 0x14]
push 0x42ae84
push eax
call esi
add esp, 8
test al, al
jne 0x416322
mov ecx, dword [esp + 0x38]
mov edx, 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]
test ecx, ecx
jne 0x41638a
mov ecx, edx
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x416394
mov eax, edx
push ecx
push eax
push str.rand
push str.peerid
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
je 0x4163c4
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea eax, [esp + 0x14]
mov edx, dword [ecx]
lea ecx, [esp + 0x24]
push edx
push 0
push eax
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 eax, dword [esp + 0x18]
test eax, eax
je 0x4163e9
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4163e0
cmp al, 0xff
je 0x4163e0
dec al
mov byte [ecx], al
jmp 0x4163e9
push ecx
call fcn.00421c18
add esp, 4
xor ebx, ebx
mov ecx, dword [esp + 0x38]
mov byte [esp + 0x964], 0
cmp ecx, ebx
je 0x416417
mov al, byte [ecx - 1]
test al, al
je 0x41640d
cmp al, 0xff
je 0x41640d
dec al
mov byte [ecx - 1], al
jmp 0x416417
dec ecx
push ecx
call fcn.00421c18
add esp, 4
mov esi, dword [esp + 0x96c]
mov cl, byte [esp + 0x24]
mov byte [esi], cl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [esp + 0x24]
mov eax, dword [edx]
push eax
push ebx
push ecx
mov ecx, esi
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 [esp + 0x28]
cmp ecx, ebx
je 0x416468
mov al, byte [ecx - 1]
test al, al
je 0x41645e
cmp al, 0xff
je 0x41645e
dec al
mov byte [ecx - 1], al
jmp 0x416468
dec ecx
push ecx
call fcn.00421c18
add esp, 4
mov ecx, dword [esp + 0x95c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x958
ret 4