Function at 0x4afd70
Capabilities:
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c2240
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5603e8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [0x5603cc]
mov edx, dword [eax + 0xc]
xor esi, esi
mov ecx, 0x5603cc
mov dword [ebp - 0x24], esi
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], esi
cmp dword [edi - 0xc], esi
je 0x4afdff
mov esi, dword [ebp + 8]
push edi
mov ecx, esi
call fcn.0049a400
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4afdeb
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x5603cc]
mov eax, dword [edx + 0xc]
mov ecx, 0x5603cc
mov dword [ebp - 0x24], str.HttpIOKernel_1.1
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], 0x200
mov edx, dword [ebp - 0x18]
mov byte [ebp - 4], 2
lea ebx, [ebx]
test edx, edx
js 0x4afe91
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
mov ebx, edx
jge 0x4afe53
push edx
lea ecx, [ebp - 0x1c]
call fcn.004ae940
mov esi, dword [ebp - 0x1c]
cmp ebx, dword [esi - 8]
jg 0x4afed1
lea ecx, [ebp - 0x18]
push ecx
push esi
mov dword [esi - 0xc], ebx
push 0
mov byte [ebx + esi], 0
call sub.urlmon.dll_ObtainUserAgentString
cmp eax, 0x8007000e
jne 0x4afe91
mov edx, dword [ebp - 0x18]
add edx, edx
mov dword [ebp - 0x18], edx
jmp 0x4afe30
mov dword [ebp - 4], 1
mov eax, dword [esi - 8]
push eax
push esi
call dword [sym.imp.MSVCR100.dll_strnlen]
add esp, 8
test eax, eax
js 0x4afed1
cmp eax, dword [esi - 8]
jg 0x4afed1
mov dword [esi - 0xc], eax
mov byte [eax + esi], 0
cmp dword [esi - 0xc], 0
je 0x4aff75
mov edx, dword [esi - 0xc]
lea ebx, [edx + 1]
mov byte [ebp - 4], 4
mov dword [ebp - 0x20], edx
test ebx, ebx
jns 0x4afedb
push 0x80070057
call fcn.00417330
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x4afefb
push ebx
lea ecx, [ebp - 0x14]
call fcn.0046f820
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
cmp ebx, dword [edi - 8]
jg 0x4afed1
xor eax, eax
inc edx
push edx
mov dword [edi - 0xc], ebx
push edi
mov word [edi + ebx*2], ax
mov eax, dword [esi - 0xc]
push eax
push esi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, 0xffffffff
jne 0x4aff2e
mov eax, dword [edi - 8]
push eax
push edi
call dword [sym.imp.MSVCR100.dll_wcsnlen]
add esp, 8
test eax, eax
js 0x4afed1
cmp eax, dword [edi - 8]
jg 0x4afed1
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov dword [ebp - 4], 1
jmp 0x4aff75
cmp dword [edi - 0xc], 0
jne 0x4affe4
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp + 8]
push eax
mov ecx, ebx
call fcn.0049a400
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4affa9
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4b0090
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add edi, 0xfffffff0
call eax
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x4b000b
cmp eax, dword [edi]
jne 0x4b000b
mov ebx, edi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4b0048
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x4b0024
call fcn.004ae440
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [edi + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [ebx + 0x10]
push ecx
call dword [sym.imp.MSVCR100.dll_memcpy_s]
add esp, 0x10
lea edx, [ebx + 0x10]
mov ebx, dword [ebp + 8]
add esi, 0xfffffff0
mov dword [ebx], edx
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4b0070
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4b0090
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret