Function at 0x40a06e
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4333ec
mov eax, dword fs:[0]
push eax
sub esp, 0x3d8
mov eax, dword [0x445bbc]
xor eax, esp
mov dword [esp + 0x3d0], eax
push ebx
push esi
push edi
mov eax, dword [0x445bbc]
xor eax, esp
push eax
lea eax, [esp + 0x3e8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
xor ebx, ebx
push ebx
mov dword [esp + 0x20], eax
push str.config
lea eax, [esp + 0x9c]
mov edi, ecx
push eax
mov dword [esp + 0x1c], edi
call fcn.0040650a
push str.0804
push str.langid
lea esi, [esp + 0x9c]
mov dword [esp + 0x3f8], ebx
call fcn.00406809
push 0x439178
push 0x438c64
call fcn.00406809
push ebx
push str.param
lea eax, [esp + 0x144]
push eax
call fcn.0040650a
push edi
push str.main
lea esi, [esp + 0x144]
mov byte [esp + 0x3f8], 1
call fcn.00406809
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea esi, [esp + 0x20]
mov byte [esp + 0x3f0], 2
call fcn.004133d9
cmp dword [esp + 0x38], 0x10
mov eax, dword [esp + 0x24]
jae 0x40a15a
lea eax, [esp + 0x24]
push eax
push str.peerid
lea esi, [esp + 0x144]
call fcn.00406809
lea ecx, [esp + 0x58]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea edi, [esp + 0x58]
mov byte [esp + 0x3f0], 3
call fcn.0041342e
cmp dword [esp + 0x70], 0x10
mov eax, dword [esp + 0x5c]
jae 0x40a196
lea eax, [esp + 0x5c]
push eax
push 0x43918c
lea esi, [esp + 0x144]
call fcn.00406809
xor eax, eax
mov byte [esp + 0x14], bl
lea edi, [esp + 0x15]
stosb byte es:[edi], al
push 0xa
lea eax, [esp + 0x18]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.MSVCR90.dll__itoa]
add esp, 0xc
push eax
push str.type
call fcn.00406809
mov eax, esi
push eax
lea esi, [esp + 0x98]
call fcn.00406860
push ebx
push str.Info
lea eax, [esp + 0x33c]
push eax
call fcn.0040650a
lea eax, [esp + 0x334]
push eax
mov byte [esp + 0x3f4], 4
call fcn.00406860
push ebx
push str.productlist
lea eax, [esp + 0x294]
push eax
call fcn.0040650a
push ebx
push str.product
lea eax, [esp + 0x1ec]
push eax
mov byte [esp + 0x3fc], 5
call fcn.0040650a
push dword [esp + 0x10]
lea esi, [esp + 0x1e8]
push str.name
mov byte [esp + 0x3f8], 6
call fcn.00406809
push dword [esp + 0x18]
push str.version
call fcn.00406809
push 0x43903c
push str.info
call fcn.00406809
xor edi, edi
call fcn.00401078
cmp byte [eax], bl
je 0x40a386
mov ecx, dword [eax + 0x5c]
sub ecx, dword [eax + 0x58]
sar ecx, 5
cmp edi, ecx
jae 0x40a386
push 0xa4
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [esp + 0x18], eax
mov byte [esp + 0x3f0], 7
cmp eax, ebx
je 0x40a2bd
push ebx
push str.packet
push eax
call fcn.0040650a
mov dword [esp + 0x10], eax
jmp 0x40a2c1
mov dword [esp + 0x10], ebx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3f0], 6
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov byte [esp + 0x3f0], 8
call fcn.00401078
cmp byte [eax], bl
je 0x40a33a
lea esi, [eax + 0x4c]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
sar eax, 5
cmp edi, eax
jae 0x40a33a
push edi
call fcn.004124ae
mov esi, eax
push esi
lea ecx, [esp + 0x78]
call dword [sym.imp.MSVCP90.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 al, byte [esi + 0x1c]
mov byte [esp + 0x90], al
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x3f4], 9
call dword [0x434330]
lea ecx, [esp + 0x74]
mov byte [esp + 0x3f0], 8
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp dword [esp + 0x54], 0x10
mov eax, dword [esp + 0x40]
jae 0x40a349
lea eax, [esp + 0x40]
mov esi, dword [esp + 0x10]
push eax
push str.packid
call fcn.00406809
push esi
lea esi, [esp + 0x1e8]
call fcn.00406860
mov esi, dword [esp + 0x10]
call fcn.00403166
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3f0], 6
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
inc edi
jmp 0x40a272
lea eax, [esp + 0x1e4]
push eax
lea esi, [esp + 0x290]
call fcn.00406860
mov eax, esi
push eax
lea esi, [esp + 0x98]
call fcn.00406860
push dword [esp + 0x1c]
mov eax, esi
push eax
call fcn.004037f3
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x3f0], 5
call fcn.004065d3
lea ecx, [esp + 0x28c]
mov byte [esp + 0x3f0], 4
call fcn.004065d3
lea ecx, [esp + 0x334]
mov byte [esp + 0x3f0], 3
call fcn.004065d3
lea ecx, [esp + 0x58]
mov byte [esp + 0x3f0], 2
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x20]
mov byte [esp + 0x3f0], 1
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x13c]
mov byte [esp + 0x3f0], bl
call fcn.004065d3
or dword [esp + 0x3f0], 0xffffffff
mov ecx, esi
call fcn.004065d3
mov ecx, dword [esp + 0x3e8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, esp
call fcn.00428868
mov esp, ebp
pop ebp
ret