Function at 0x509648
Capabilities:
Resolve function by parsing pe exports
Set registry value

Disassembly:
sub esp, 0x474
push ebx
push ebp
push esi
push edi
push dword [0x6c7ea8]
call fcn.0052d287
xor ebx, ebx
xor ebp, ebp
inc ebx
mov esi, eax
cmp dword [0x6c435c], ebp
jne 0x5097f2
push ebp
mov dword [0x6c435c], ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov edi, 0xa4
push edi
push ebp
push 0x6c42b8
call sub.MSVCRT.dll_memset
push 0x30
mov dword [0x6c42bc], edi
lea eax, [esp + 0x38]
pop edi
push edi
push ebp
push eax
mov dword [0x6c42b8], 0x12
mov dword [0x6c42c4], 0x509bd7
mov dword [0x6c42cc], 0x50a398
mov dword [0x6c42d0], 0x50a055
mov dword [0x6c42d4], 0x50a3e5
mov dword [0x6c42f8], 0x509e34
mov dword [0x6c42fc], 0x50a2d2
mov dword [0x6c4320], 0x509c54
mov dword [0x6c4324], 0x50a0eb
call sub.MSVCRT.dll_memset
mov eax, dword [0x6c2524]
add esp, 0x18
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], 0x509977
push eax
mov dword [esp + 0x54], str.PureWeb
mov dword [esp + 0x30], 3
call dword [sym.imp.USER32.dll_RegisterClassExW]
push 0x104
lea eax, [esp + 0x78]
mov dword [0x6c7fd4], 0x509a53
push eax
push dword [0x6c2524]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
lea ecx, [esp + 0x74]
mov word [esp + 0x27c], ax
mov edx, ecx
mov ax, word [esp + 0x74]
test ax, ax
je 0x509787
movzx eax, ax
cmp ax, 0x2f
je 0x509779
cmp ax, 0x5c
jne 0x50977c
lea edx, [ecx + 2]
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x50976d
push edx
lea eax, [esp + 0x280]
push eax
call sub.MSVCRT.dll_wcscpy
pop ecx
pop ecx
cmp word [esp + 0x27c], bp
je 0x5097f2
push ebp
lea eax, [esp + 0x14]
push eax
push ebp
push 0x20006
push ebx
push ebp
push ebp
push str.SOFTWAREMicrosoftInternet_ExplorerMainFeatureControlFEATURE_BROWSER_EMULATION
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x5097f2
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x2af9
push eax
push 4
push ebp
lea eax, [esp + 0x28c]
push eax
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x498]
push eax
lea eax, [esp + 0x498]
push eax
lea eax, [esp + 0x498]
push eax
lea eax, [esp + 0x498]
push eax
call fcn.00518488
push ebp
push dword [0x6c2524]
push 0xffffffffffffffff
push dword [esi]
push dword [esp + 0x4a8]
push dword [esp + 0x4a8]
push dword [esp + 0x4a8]
push dword [esp + 0x4a8]
push 0x50000000
push 0x5ddd28
push str.PureWeb
push ebp
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov edi, eax
test edi, edi
je 0x509948
push 0xffffffffffffffeb
push edi
call dword [sym.imp.USER32.dll_GetWindowLongW]
push dword [esp + 0x488]
mov ebx, eax
push dword [0x6c7ea4]
call fcn.0052d8e3
push 0x6c42b8
push edi
mov esi, eax
push esi
push dword [esp + 0x494]
call fcn.00512b57
push esi
mov edi, eax
call fcn.00509afc
mov ecx, dword [ebx]
push 1
push ebx
call dword [ecx + 0xf0]
cmp dword [esi + 0x10], ebp
je 0x509931
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
push 8
pop eax
push 0x5ddd30
mov word [esp + 0x1c], ax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push ebp
push ebp
push ebp
push ebp
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x28]
mov eax, dword [ebx]
push ecx
push ebx
call dword [eax + 0xd0]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esi + 0x10]
cmp dword [eax + 0x20], ebp
jne 0x509931
mov ebx, dword [sym.imp.USER32.dll_PeekMessageW]
jmp 0x509911
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 3
push ebp
push ebp
push ebp
lea eax, [esp + 0x68]
push eax
call ebx
test eax, eax
jne 0x5098fb
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 0x10]
cmp dword [eax + 0x20], ebp
je 0x509911
mov eax, dword [esp + 0x49c]
test eax, eax
je 0x509948
cmp word [eax], bp
je 0x509948
push eax
push esi
call fcn.0050a3e5
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x474
ret 0x1c