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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44d30b
push eax
mov eax, 0x2e84
mov dword fs:[0], esp
call fcn.004473e0
push ebx
push esi
push edi
mov ecx, 0x912
xor eax, eax
lea edi, [ebp - 0x2e90]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x14]
xor esi, esi
cmp eax, esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], 1
jne 0x40f463
cmp dword [ebp + 0x1c], esi
jne 0x40f463
xor eax, eax
jmp 0x40f74c
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x2e90]
push esi
push eax
push ebx
call fcn.0040a660
add esp, 0xc
test eax, eax
je 0x40f749
push 0x628d8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x14], eax
cmp eax, esi
mov dword [ebp - 4], esi
je 0x40f49f
mov ecx, eax
call fcn.0040a390
mov esi, eax
test esi, esi
mov dword [ebp - 4], 0xffffffff
je 0x40f749
mov cl, byte [0x4d6e30]
xor eax, eax
mov byte [ebp - 0xa48], cl
mov ecx, 0x208
lea edi, [ebp - 0xa47]
lea edx, [ebp - 0x14]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0xa48]
push edx
push eax
push 0
mov dword [ebp - 0x14], 0x824
call sub.urlmon.dll_ObtainUserAgentString
lea edx, [esi + 0x5d330]
push ebx
mov ecx, 0x412
xor eax, eax
mov edi, edx
push 0x463604
push 0x824
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
add esp, 0x10
mov dword [esi + 0x269c], ecx
mov ecx, esi
push edx
call fcn.0040e370
lea eax, [ebp - 0xa48]
test eax, eax
jne 0x40f52d
xor ebx, ebx
jmp 0x40f566
lea ecx, [ebp - 0xa48]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea eax, [edi + edi]
add eax, 3
and al, 0xfc
call fcn.004473e0
mov ebx, esp
push edi
push ebx
lea edx, [ebp - 0xa48]
push 0xffffffffffffffff
push edx
push 0
push 0
mov word [ebx], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [esi + 0x61650]
push ebx
mov ecx, 0x412
xor eax, eax
mov edi, edx
push 0x463604
push 0x824
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
mov eax, dword [ebp + 0x20]
add esp, 0x10
mov dword [esi + 0x2690], eax
mov eax, dword [ebp + 0x10]
test eax, eax
mov dword [esi + 0x2694], 0x40f370
jne 0x40f6a2
mov edx, dword [ebp + 8]
lea ecx, [ebp + 0x18]
push ecx
push 0
push edx
mov dword [ebp + 0x18], 0
call dword [sym.imp.WININET.dll_GetUrlCacheEntryInfoW]
test eax, eax
jne 0x40f6a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40f6a2
mov eax, dword [ebp + 0x18]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40f6a2
mov ecx, dword [ebp + 0x18]
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [ebp + 8]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x18]
lea ecx, [ebp + 0x18]
push ecx
push ebx
push edx
mov dword [ebx], eax
call dword [sym.imp.WININET.dll_GetUrlCacheEntryInfoW]
test eax, eax
je 0x40f68e
mov eax, dword [ebx + 8]
lea edx, [esi + 0x5cf20]
mov dword [ebp + 0x10], eax
mov ecx, 0x82
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x10]
mov edi, dword [sym.imp.MSVCRT.dll__snwprintf]
push ecx
push 0x463604
push 0x104
push edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 1
call edi
mov eax, dword [ebp + 0x14]
add esp, 0x10
test eax, eax
je 0x40f67a
mov edx, dword [ebx + 8]
mov eax, dword [ebp + 0x24]
push edx
push 0x463604
push 0x104
push eax
call edi
add esp, 0x10
jmp 0x40f68e
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x1c]
push ecx
push esi
push 0x1405
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
push ebx
call fcn.0044737a
mov eax, dword [ebp - 0x18]
add esp, 4
test eax, eax
je 0x40f741
mov ax, word [0x4d6e34]
mov ecx, 0x82
mov word [ebp - 0x224], ax
xor eax, eax
lea edi, [ebp - 0x222]
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x24]
test edi, edi
jne 0x40f6ce
lea eax, [ebp - 0x224]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
push eax
push ecx
push 0
push edx
call dword [sym.imp.WININET.dll_CreateUrlCacheEntryW]
test eax, eax
je 0x40f741
mov ebx, dword [ebp + 0x24]
test edi, edi
jne 0x40f6f2
lea ebx, [ebp - 0x224]
lea edx, [esi + 0x5cf20]
push ebx
mov ecx, 0x82
xor eax, eax
mov edi, edx
push 0x463604
push 0x104
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
mov ecx, esi
call fcn.0040a740
test eax, eax
je 0x40f741
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40f749
mov ecx, esi
call fcn.0040aa40
cmp dword [esi + 0x5cf08], 7
jne 0x40f741
mov dword [ebp - 0x10], 1
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x2e9c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret