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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4331ae
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.00406370
push str.0804
push str.langid
lea esi, [esp + 0x9c]
mov dword [esp + 0x3f8], ebx
call fcn.0040666f
push 0x4391e4
push 0x438c54
call fcn.0040666f
push ebx
push str.param
lea eax, [esp + 0x144]
push eax
call fcn.00406370
push edi
push str.main
lea esi, [esp + 0x144]
mov byte [esp + 0x3f8], 1
call fcn.0040666f
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.004132a0
cmp dword [esp + 0x38], 0x10
mov eax, dword [esp + 0x24]
jae 0x40a013
lea eax, [esp + 0x24]
push eax
push str.peerid
lea esi, [esp + 0x144]
call fcn.0040666f
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.004132f5
cmp dword [esp + 0x70], 0x10
mov eax, dword [esp + 0x5c]
jae 0x40a04f
lea eax, [esp + 0x5c]
push eax
push 0x4391f8
lea esi, [esp + 0x144]
call fcn.0040666f
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.0040666f
mov eax, esi
push eax
lea esi, [esp + 0x98]
call fcn.004066c6
push ebx
push str.Info
lea eax, [esp + 0x33c]
push eax
call fcn.00406370
lea eax, [esp + 0x334]
push eax
mov byte [esp + 0x3f4], 4
call fcn.004066c6
push ebx
push str.productlist
lea eax, [esp + 0x294]
push eax
call fcn.00406370
push ebx
push str.product
lea eax, [esp + 0x1ec]
push eax
mov byte [esp + 0x3fc], 5
call fcn.00406370
push dword [esp + 0x10]
lea esi, [esp + 0x1e8]
push str.name
mov byte [esp + 0x3f8], 6
call fcn.0040666f
push dword [esp + 0x18]
push str.version
call fcn.0040666f
push 0x438ff0
push str.info
call fcn.0040666f
xor edi, edi
call fcn.00401094
cmp byte [eax], bl
je 0x40a23f
mov ecx, dword [eax + 0x5c]
sub ecx, dword [eax + 0x58]
sar ecx, 5
cmp edi, ecx
jae 0x40a23f
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 0x40a176
push ebx
push str.packet
push eax
call fcn.00406370
mov dword [esp + 0x10], eax
jmp 0x40a17a
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.00401094
cmp byte [eax], bl
je 0x40a1f3
lea esi, [eax + 0x4c]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
sar eax, 5
cmp edi, eax
jae 0x40a1f3
push edi
call fcn.00412375
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 0x40a202
lea eax, [esp + 0x40]
mov esi, dword [esp + 0x10]
push eax
push str.packid
call fcn.0040666f
push esi
lea esi, [esp + 0x1e8]
call fcn.004066c6
mov esi, dword [esp + 0x10]
call fcn.004031b9
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 0x40a12b
lea eax, [esp + 0x1e4]
push eax
lea esi, [esp + 0x290]
call fcn.004066c6
mov eax, esi
push eax
lea esi, [esp + 0x98]
call fcn.004066c6
push dword [esp + 0x1c]
mov eax, esi
push eax
call fcn.00403843
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x3f0], 5
call fcn.00406439
lea ecx, [esp + 0x28c]
mov byte [esp + 0x3f0], 4
call fcn.00406439
lea ecx, [esp + 0x334]
mov byte [esp + 0x3f0], 3
call fcn.00406439
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.00406439
or dword [esp + 0x3f0], 0xffffffff
mov ecx, esi
call fcn.00406439
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.0042860c
mov esp, ebp
pop ebp
ret