Function at 0x401d53
Capabilities:
Check http status code
Get proxy
Initialize winsock library
Link many functions at runtime
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
jne 0x401d90
mov ecx, dword [0x4104a0]
cmp ecx, ebx
je 0x401d86
mov eax, dword [0x410428]
cmp eax, ebx
je 0x401d86
push ecx
call eax
mov dword [0x4104a0], ebx
mov dword [0x410410], ebx
call sub.WSOCK32.dll_WSACleanup
jmp 0x4028ba
cmp dword [0x418140], ebx
push esi
push edi
jne 0x402276
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
lea eax, [ebp - 0x10]
push eax
push 0x410460
push str.WebDeployProxyUsername
mov edi, closesocket
push edi
mov word [0x41041c], 0x50
mov byte [0x4108e0], bl
mov byte [0x410460], bl
mov byte [0x4104c0], bl
mov byte [0x418160], bl
mov dword [ebp - 0x10], 0x40
call esi
test eax, eax
je 0x401dec
mov byte [0x410460], bl
lea eax, [ebp - 0x10]
push eax
push 0x4108e0
push str.WebDeployProxyPassword
push edi
mov dword [ebp - 0x10], 0x40
call esi
test eax, eax
je 0x401e0e
mov byte [0x4108e0], bl
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x34c]
push eax
push str.WebDeployProxyEnable
push edi
mov dword [ebp - 0x10], 0x100
call esi
test eax, eax
jne 0x401e6d
cmp byte [ebp - 0x34c], 0x31
jne 0x402255
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x34c]
push eax
push str.WebDeployProxyServer
push edi
mov dword [ebp - 0x10], 0x200
call esi
test eax, eax
jne 0x402255
lea eax, [ebp - 0x34c]
push eax
call fcn.004010e9
pop ecx
jmp 0x402255
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SoftwareNetscapeNetscape_NavigatorProxy_Information
push closesocket
mov dword [ebp - 0xc], ebx
call edi
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jne 0x402010
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.Proxy_Type
push dword [ebp - 4]
mov dword [ebp - 8], 4
call esi
test eax, eax
jne 0x401f5a
cmp dword [ebp - 0x1c], ebx
mov dword [ebp - 8], 0x100
je 0x401f5a
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.HTTP_Proxy
push dword [ebp - 4]
mov dword [ebp - 0xc], 1
call esi
test eax, eax
jne 0x401f5a
lea eax, [ebp - 0x34c]
push eax
push 0x418160
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [0x418160], bl
je 0x401f5a
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.HTTP_ProxyPort
push dword [ebp - 4]
mov dword [ebp - 8], 4
call esi
test eax, eax
jne 0x401f3b
mov ax, word [ebp - 0x1c]
mov word [0x41041c], ax
lea eax, [ebp - 8]
push eax
push 0x4104c0
lea eax, [ebp - 0x18]
push eax
push ebx
push str.No_Proxy
push dword [ebp - 4]
mov dword [ebp - 8], 0x3ff
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x418160], bl
jne 0x40220b
cmp dword [ebp - 0xc], ebx
je 0x40201c
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SoftwareNetscapeNetscape_NavigatorServices
push closesocket
call edi
test eax, eax
jne 0x402010
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x20]
push eax
push ebx
push str.SOCKS_Server
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x100
call esi
test eax, eax
jne 0x402007
lea eax, [ebp - 0x34c]
push eax
push 0x418160
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [0x418160], bl
je 0x402007
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push eax
push ebx
push str.SOCKS_ServerPort
push dword [ebp - 4]
mov dword [0x410920], 1
mov dword [ebp - 0xc], 4
call esi
test eax, eax
jne 0x402007
mov ax, word [ebp - 0x14]
mov word [0x41041c], ax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x418160], bl
jne 0x40220b
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push closesocket
call edi
test eax, eax
jne 0x4020bb
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.ProxyEnable
push dword [ebp - 4]
mov dword [ebp - 8], 4
call esi
test eax, eax
jne 0x4020b2
cmp dword [ebp - 0x14], ebx
je 0x4020b2
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.ProxyServer
push dword [ebp - 4]
mov dword [ebp - 8], 0x200
call esi
test eax, eax
jne 0x402093
lea eax, [ebp - 0x34c]
push eax
call fcn.004010e9
pop ecx
lea eax, [ebp - 8]
push eax
push 0x4104c0
lea eax, [ebp - 0xc]
push eax
push ebx
push str.ProxyOverride
push dword [ebp - 4]
mov dword [ebp - 8], 0x3ff
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x418160], bl
jne 0x40220b
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x14c]
push eax
push str.NetscapeMarkup_shellopencommand
push closesocket
mov dword [ebp - 0x14], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x40220b
cmp byte [ebp - 0x14c], bl
je 0x40220b
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x14c]
dec ecx
add eax, ecx
jmp 0x40211b
cmp byte [eax], 0x5c
je 0x40212a
dec eax
lea ecx, [ebp - 0x14c]
cmp eax, ecx
ja 0x402115
cmp byte [eax], 0x5c
jne 0x40212b
inc eax
push str.NETSCAPE.INI
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x14c]
push eax
push ebx
push str.Proxy_Type
mov esi, str.Proxy_Information
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x40220b
lea eax, [ebp - 0x14c]
push eax
push ebx
push str.Http_ProxyPort
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov word [0x41041c], ax
lea eax, [ebp - 0x14c]
push eax
push 0x100
push 0x418160
push 0x40645d
push str.HTTP_Proxy
push esi
call edi
lea eax, [ebp - 0x14c]
push eax
push 0x400
push 0x4104c0
push 0x40645d
push str.No_Proxy
push esi
call edi
cmp byte [0x418160], bl
jne 0x40220b
lea eax, [ebp - 0x14c]
push eax
push 0x100
push 0x418160
push 0x40645d
push str.SOCKS_Server
mov esi, str.Services
push esi
call edi
lea eax, [ebp - 0x14c]
push eax
push ebx
push str.SOCKS_ServerPort
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp byte [0x418160], bl
mov word [0x41041c], ax
je 0x40220b
mov dword [0x410920], 1
cmp byte [0x4104c0], bl
je 0x402255
mov eax, 0x4104c0
mov dl, byte [eax]
cmp dl, 0x20
je 0x40224d
cmp dl, 9
je 0x40224d
cmp dl, 0xd
je 0x40224d
cmp dl, 0xa
je 0x40224d
cmp dl, 0x2c
je 0x40224d
cmp dl, 0x2a
jne 0x402325
lea ecx, [eax + 1]
cmp byte [ecx], 0x2e
jne 0x402325
mov byte [eax], 0x3b
mov eax, ecx
mov byte [eax], 0x3b
inc eax
cmp byte [eax], bl
jne 0x402218
push 0x418280
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x402344
mov dword [0x418140], 1
cmp dword [ebp + 0x10], ebx
mov eax, dword [ebp + 0x2c]
mov dword [0x410414], ebx
mov dword [0x41814c], eax
jne 0x4022d9
cmp dword [0x410920], ebx
mov dword [0x410414], 1
mov ecx, str.SOCKS
jne 0x4022a5
mov ecx, str.CERN
push ecx
movzx ecx, word [0x41041c]
push ecx
push 0x4104c0
push 0x418160
push str.ProxyServer_s_r_nProxyIgnore_s_r_nProxyPort_d_r_nProxyType_s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push dword [0x41814c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [0x41814c], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x20]
mov dword [0x410420], eax
mov eax, dword [ebp + 8]
mov dword [0x41042c], eax
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
mov dword [0x410924], ecx
mov ecx, dword [ebp + 0x14]
mov dword [0x410424], eax
mov dword [0x4108c0], ebx
mov dword [0x410928], ebx
mov dword [0x410434], ebx
mov dword [0x418260], ecx
jge 0x40234c
or dword [0x40804c], 0xffffffff
jmp 0x4027aa
cmp dl, 0x3a
jne 0x402250
jmp 0x402335
cmp byte [eax], 0x39
jg 0x40233e
mov byte [eax], 0x3b
inc eax
cmp byte [eax], 0x30
jge 0x402330
dec eax
jmp 0x402250
or eax, 0xffffffff
jmp 0x4028b8
cmp dword [ebp + 0x10], ebx
mov eax, str.C:GLHTTP1.TMP
je 0x402359
mov eax, dword [ebp + 0x10]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
cmp dword [0x410410], ebx
mov dword [0x40804c], eax
jne 0x40244d
cmp eax, 0xffffffff
je 0x40244d
push str.WININET.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4023fa
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InternetOpenA
push edi
call esi
push str.InternetOpenUrlA
push edi
mov dword [0x418144], eax
call esi
push str.InternetReadFile
push edi
mov dword [0x418150], eax
call esi
push str.InternetCloseHandle
push edi
mov dword [0x410418], eax
call esi
push str.HttpQueryInfoA
push edi
mov dword [0x410428], eax
call esi
push str.InternetGetLastResponseInfoA
push edi
mov dword [0x418148], eax
call esi
push str.InternetSetOptionA
push edi
mov dword [0x410430], eax
call esi
push str.InternetErrorDlg
push edi
mov dword [0x4104a4], eax
call esi
mov dword [0x410440], eax
mov eax, dword [0x418144]
cmp eax, ebx
je 0x402443
cmp dword [0x418150], ebx
je 0x402443
cmp dword [0x410418], ebx
je 0x402443
cmp dword [0x410428], ebx
je 0x402443
cmp dword [0x418148], ebx
je 0x402443
cmp dword [0x4104a4], ebx
je 0x402443
cmp dword [0x410440], ebx
je 0x402443
push ebx
push ebx
push ebx
push ebx
push str.Wise
call eax
mov dword [0x4104a0], eax
mov dword [0x410410], 1
cmp dword [0x4104a0], ebx
je 0x402782
mov eax, dword [ebp + 0xc]
cmp byte [eax], bl
mov byte [ebp - 0x14c], bl
mov byte [ebp - 0x44c], bl
lea edi, [ebp - 0x24c]
lea esi, [ebp - 0x24c]
mov dword [ebp + 0x2c], eax
je 0x4024c6
mov dword [ebp + 0x18], ebx
mov eax, dword [ebp + 0x2c]
mov al, byte [eax]
cmp al, 0x3a
jne 0x40248d
cmp dword [ebp + 0x18], 5
jg 0x402491
cmp al, 0x40
jne 0x4024b0
mov byte [esi], bl
cmp al, 0x3a
lea esi, [edi + 1]
lea eax, [ebp - 0x44c]
je 0x4024a6
lea eax, [ebp - 0x14c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x4024b9
cmp al, 0x2f
mov byte [esi], al
jne 0x4024b8
mov edi, esi
inc esi
inc dword [ebp + 0x2c]
mov eax, dword [ebp + 0x2c]
inc dword [ebp + 0x18]
cmp byte [eax], bl
jne 0x40247e
cmp byte [ebp - 0x44c], bl
mov byte [esi], bl
mov byte [ebp - 0x84c], bl
je 0x402514
cmp byte [ebp - 0x14c], bl
je 0x402514
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0xa4c]
push eax
call fcn.004011ff
lea eax, [ebp - 0xa4c]
push eax
lea eax, [ebp - 0x84c]
push str.Authorization:_Basic__s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
cmp byte [0x410460], bl
je 0x402554
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, 0x410460
push edi
call esi
inc eax
push eax
push edi
push 0x2b
push dword [0x4104a0]
call dword [0x4104a4]
mov edi, 0x4108e0
push edi
call esi
inc eax
push eax
push edi
push 0x2c
push dword [0x4104a0]
call dword [0x4104a4]
push str.Accept:___r_n
lea eax, [ebp - 0x84c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
mov edi, 0x4400000
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x84c]
push eax
lea eax, [ebp - 0x24c]
push eax
push dword [0x4104a0]
call dword [0x418150]
cmp eax, ebx
mov dword [ebp + 0x2c], eax
je 0x4026ea
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x20]
push eax
lea eax, [ebp + 8]
push eax
mov esi, 0x20000013
push esi
push dword [ebp + 0x2c]
mov dword [ebp + 0x1c], ebx
mov dword [ebp + 0x20], 4
call dword [0x418148]
test eax, eax
je 0x4026ea
cmp dword [ebp + 8], 0x197
jne 0x402612
push ebx
push 7
push ebx
push dword [ebp + 0x2c]
push dword [0x418260]
call dword [0x410440]
push ebx
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x84c]
push eax
lea eax, [ebp - 0x24c]
push eax
push dword [0x4104a0]
call dword [0x418150]
lea ecx, [ebp + 0x1c]
push ecx
lea ecx, [ebp + 0x20]
push ecx
lea ecx, [ebp + 8]
push ecx
push esi
push eax
mov dword [ebp + 0x2c], eax
call dword [0x418148]
cmp dword [ebp + 8], 0x190
jae 0x4026ea
lea eax, [ebp + 0x18]
push eax
push 0x7800
mov edi, 0x410940
push edi
push dword [ebp + 0x2c]
call dword [0x410418]
test eax, eax
je 0x4026a9
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov eax, dword [0x41042c]
cmp dword [eax], ebx
jne 0x4026a9
cmp dword [ebp + 0x18], ebx
je 0x4026a9
push dword [ebp + 0x18]
push edi
push dword [0x40804c]
call dword [sym.imp.KERNEL32.dll__lwrite]
push dword [ebp + 0x18]
call fcn.0040109b
pop ecx
jmp 0x40267e
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push ebx
push ebx
push dword [0x418260]
lea eax, [ebp - 0x4c]
push eax
call esi
test eax, eax
jne 0x40266a
lea eax, [ebp + 0x18]
push eax
push 0x7800
push edi
push dword [ebp + 0x2c]
call dword [0x410418]
test eax, eax
jne 0x402641
push dword [0x40804c]
call dword [sym.imp.KERNEL32.dll__lclose]
push dword [ebp + 0x2c]
or dword [0x40804c], 0xffffffff
call dword [0x410428]
mov eax, dword [0x41042c]
cmp dword [eax], ebx
jne 0x4026e3
cmp dword [0x4108c0], ebx
jl 0x4026e3
mov eax, dword [0x410420]
mov ecx, dword [0x410924]
add dword [eax], ecx
xor eax, eax
jmp 0x4028b2
cmp dword [ebp + 0x10], ebx
jne 0x40276e
cmp dword [0x410430], ebx
je 0x40276e
push str.WinInetText
push dword [0x41814c]
mov dword [ebp + 0x2c], 0x100
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [0x41814c]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call esi
add dword [0x41814c], eax
lea eax, [ebp + 0x2c]
push eax
push dword [0x41814c]
lea eax, [ebp + 0x18]
push eax
call dword [0x410430]
test eax, eax
je 0x40276e
push dword [0x41814c]
call esi
push dword [ebp + 0x18]
add dword [0x41814c], eax
push str._r_nWinInetError_lu_r_n
push dword [0x41814c]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [0x41814c]
call esi
add dword [0x41814c], eax
push dword [0x4104a0]
call dword [0x410428]
mov dword [0x4104a0], ebx
jmp 0x4027aa
cmp dword [ebp + 0x10], ebx
jne 0x4027aa
push str.WinInetNot_Found_r_n
push dword [0x41814c]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [0x41814c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [0x41814c], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004017f6
test eax, eax
pop ecx
pop ecx
je 0x4027fc
call fcn.0040147b
call fcn.00401022
cmp dword [ebp + 0x24], ebx
je 0x402817
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0x28]
push dword [ebp + 0x24]
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push dword [0x40804c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x402817
cmp dword [0x4108c0], ebx
jl 0x402817
mov eax, dword [0x41042c]
cmp dword [eax], ebx
jne 0x402817
mov dword [0x4108c0], 0xffffffd8
mov eax, dword [0x40804c]
cmp eax, 0xffffffff
je 0x40282f
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
or dword [0x40804c], 0xffffffff
cmp dword [section..data], 0xffffffff
je 0x40284d
push dword [0x418260]
push ebx
push ebx
push section..data
call fcn.004012e6
add esp, 0x10
cmp dword [0x410434], ebx
jne 0x402870
cmp dword [0x4108c0], ebx
jl 0x402870
mov eax, dword [0x41042c]
cmp dword [eax], ebx
jne 0x40288e
mov dword [0x4108c0], 0xfffffffd
mov eax, dword [0x41042c]
cmp dword [eax], ebx
jne 0x40288e
cmp dword [0x4108c0], ebx
jl 0x40288e
mov eax, dword [0x410420]
mov ecx, dword [0x410924]
add dword [eax], ecx
cmp dword [ebp + 0x10], ebx
jne 0x4028ad
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.WinSockError_d_r_n
push dword [0x41814c]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, dword [0x4108c0]
mov dword [0x41814c], ebx
pop edi
pop esi
pop ebx
leave
ret 0x28