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

Disassembly:
push ebp
sub esp, 0x958
lea ebp, [esp - 4]
mov eax, dword [0x4c3a60]
xor eax, ebp
mov dword [ebp + 0x958], eax
push 0xc
mov eax, 0x4a2331
call fcn.004771fb
mov ecx, dword [ebp + 0x964]
mov eax, dword [ebp + 0x96c]
xor esi, esi
push 0x4b26c4
mov dword [ebp - 4], esi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], esi
call fcn.00402477
xor edi, edi
inc edi
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], edi
cmp dword [ebp + 0x968], esi
jne 0x49a77e
push 0x7ff
lea eax, [ebp + 0x55]
push esi
push eax
mov byte [ebp + 0x54], 0
call fcn.00476cc0
lea eax, [ebp + 0x1c]
push edi
push eax
call fcn.0049b5c2
add esp, 0x14
push str.pub_store.dat
lea ecx, [ebp + 0x1c]
mov dword [ebp - 4], edi
call fcn.00416ccd
cmp dword [ebp + 0x34], 0x10
mov eax, dword [ebp + 0x20]
jae 0x49a4f1
lea eax, [ebp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push eax
mov ebx, 0x800
push ebx
lea eax, [ebp + 0x54]
push eax
mov edi, 0x4b2628
push edi
push str.rand
push str.peerid
call esi
test eax, eax
je 0x49a777
lea eax, [ebp + 0x54]
push eax
lea ecx, [ebp + 0x38]
call fcn.00402477
push edi
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 2
call fcn.00499f36
test eax, eax
je 0x49a543
cmp dword [ebp + 0x4c], 3
je 0x49a5ce
push 0x104
lea eax, [ebp + 0x854]
push 0
push eax
call fcn.00476cc0
add esp, 0xc
push 0x104
lea eax, [ebp + 0x854]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x49a5ce
lea eax, [ebp + 0x854]
push eax
lea ecx, [ebp]
call fcn.00402477
push str.pub_store.dat
lea ecx, [ebp]
mov byte [ebp - 4], 3
call fcn.00416ccd
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x49a59b
lea eax, [ebp + 4]
push eax
push ebx
lea eax, [ebp + 0x54]
push eax
push edi
push str.rand
push str.peerid
call esi
test eax, eax
je 0x49a5be
lea eax, [ebp + 0x54]
push eax
lea ecx, [ebp + 0x38]
call fcn.00402454
push 0
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.0040284b
push edi
lea ecx, [ebp + 0x38]
call fcn.00499f36
test eax, eax
je 0x49a5e5
cmp dword [ebp + 0x4c], 3
je 0x49a6d9
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x49a6d9
xor esi, esi
xor ebx, ebx
test eax, eax
jbe 0x49a6d9
mov ecx, dword [ebp - 0x10]
imul esi, esi, 0x24
push ebx
call fcn.004537cb
cmp byte [eax], 0x30
jl 0x49a630
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
cmp byte [eax], 0x39
jg 0x49a630
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
movsx eax, byte [eax]
lea esi, [esi + eax - 0x30]
jmp 0x49a68f
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
cmp byte [eax], 0x41
jl 0x49a65e
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
cmp byte [eax], 0x5a
jg 0x49a65e
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
movsx eax, byte [eax]
lea esi, [esi + eax - 0x37]
jmp 0x49a68f
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
cmp byte [eax], 0x61
jl 0x49a68c
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
cmp byte [eax], 0x7a
jg 0x49a68c
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.004537cb
movsx eax, byte [eax]
lea esi, [esi + eax - 0x57]
jmp 0x49a68f
add esi, 0xd
mov eax, esi
xor edx, edx
mov ecx, 0xb63e
div ecx
mov esi, edx
lea eax, [esi + 1]
push eax
lea eax, [ebp]
push eax
call fcn.0049a401
pop ecx
pop ecx
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 4
call fcn.0040271f
push 0
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.0040284b
mov eax, dword [ebp - 0x10]
inc ebx
cmp ebx, dword [eax + 0x14]
jb 0x49a5ff
push edi
lea ecx, [ebp + 0x38]
call fcn.00499f36
test eax, eax
je 0x49a6f0
cmp dword [ebp + 0x4c], 3
jne 0x49a6f0
xor esi, esi
jmp 0x49a75d
xor esi, esi
call fcn.0049a03a
push eax
lea eax, [ebp]
push eax
call fcn.0049a401
pop ecx
pop ecx
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 5
call fcn.0040271f
push esi
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.0040284b
push edi
lea ecx, [ebp + 0x38]
call fcn.00499f36
test eax, eax
je 0x49a6f2
cmp dword [ebp + 0x34], 0x10
mov ecx, dword [ebp + 0x20]
jae 0x49a73b
lea ecx, [ebp + 0x20]
cmp dword [ebp + 0x50], 0x10
mov eax, dword [ebp + 0x3c]
jae 0x49a747
lea eax, [ebp + 0x3c]
push ecx
push eax
push str.rand
push str.peerid
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
je 0x49a76c
mov ecx, dword [ebp - 0x14]
push 0xffffffffffffffff
push esi
lea eax, [ebp + 0x38]
push eax
call fcn.0040271f
push esi
push 1
lea ecx, [ebp + 0x38]
call fcn.0040284b
push 0
jmp 0x49a8a0
lea eax, [ebp]
push eax
call fcn.0049b556
mov dword [esp], str.pub_store.dat
push eax
lea eax, [ebp + 0x1c]
push eax
mov dword [ebp - 4], 6
call fcn.00416bd9
add esp, 0xc
push esi
push edi
lea ecx, [ebp]
mov byte [ebp - 4], 8
call fcn.0040284b
push 0x7ff
lea eax, [ebp + 0x55]
push esi
push eax
mov byte [ebp + 0x54], 0
call fcn.00476cc0
mov eax, dword [ebp + 0x20]
add esp, 0xc
cmp dword [ebp + 0x34], 0x10
jae 0x49a7d2
lea eax, [ebp + 0x20]
push eax
push 0x800
lea eax, [ebp + 0x54]
push eax
mov edi, 0x4b2628
push edi
push str.rand
mov ebx, str.peerid
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x49a89f
lea eax, [ebp + 0x54]
push eax
lea ecx, [ebp + 0x38]
call fcn.00402477
push edi
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 9
call fcn.00499f36
test eax, eax
je 0x49a81e
cmp dword [ebp + 0x4c], 3
je 0x49a885
call fcn.0049a03a
push eax
lea eax, [ebp]
push eax
call fcn.0049a401
pop ecx
pop ecx
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 0xa
call fcn.0040271f
push esi
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 9
call fcn.0040284b
push edi
lea ecx, [ebp + 0x38]
call fcn.00499f36
test eax, eax
je 0x49a81e
cmp dword [ebp + 0x34], 0x10
mov ecx, dword [ebp + 0x20]
jae 0x49a867
lea ecx, [ebp + 0x20]
cmp dword [ebp + 0x50], 0x10
mov eax, dword [ebp + 0x3c]
jae 0x49a873
lea eax, [ebp + 0x3c]
push ecx
push eax
push str.rand
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
je 0x49a894
mov ecx, dword [ebp - 0x14]
push 0xffffffffffffffff
push esi
lea eax, [ebp + 0x38]
push eax
call fcn.0040271f
push esi
push 1
lea ecx, [ebp + 0x38]
call fcn.0040284b
push esi
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040284b
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x958]
xor ecx, ebp
call fcn.00476d3a
add ebp, 0x95c
leave
ret 0xc