Function at 0x401000
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
push esi
push edi
jne 0x40103f
mov ecx, dword [0x417ce0]
cmp ecx, ebx
je 0x401035
mov eax, dword [0x408ba4]
cmp eax, ebx
je 0x401035
push ecx
call eax
mov dword [0x417ce0], ebx
mov dword [0x408784], ebx
call sub.WSOCK32.dll_WSACleanup
jmp 0x401b51
cmp dword [0x40876c], ebx
jne 0x401539
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
lea eax, [ebp - 0x10]
push eax
push 0x417d00
mov edi, closesocket
push str.WebDeployProxyUsername
push edi
mov word [0x40878c], 0x50
mov byte [0x417d40], bl
mov byte [0x417d00], bl
mov byte [0x4087a0], bl
mov byte [0x417be0], bl
mov dword [ebp - 0x10], 0x40
call esi
test eax, eax
je 0x401099
mov byte [0x417d00], bl
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x40
push eax
push 0x417d40
push str.WebDeployProxyPassword
push edi
call esi
test eax, eax
je 0x4010bb
mov byte [0x417d40], bl
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x100
push eax
lea eax, [ebp - 0x34c]
push eax
push str.WebDeployProxyEnable
push edi
call esi
test eax, eax
jne 0x40111a
cmp byte [ebp - 0x34c], 0x31
jne 0x4014f9
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x200
push eax
lea eax, [ebp - 0x34c]
push eax
push str.WebDeployProxyServer
push edi
call esi
test eax, eax
jne 0x4014f9
lea eax, [ebp - 0x34c]
push eax
call fcn.004026b0
pop ecx
jmp 0x4014f9
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
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4012bd
lea eax, [ebp - 8]
mov dword [ebp - 8], 4
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.Proxy_Type
push dword [ebp - 4]
call esi
test eax, eax
jne 0x401207
cmp dword [ebp - 0x1c], ebx
mov dword [ebp - 8], 0x100
je 0x401207
lea eax, [ebp - 8]
mov dword [ebp - 0xc], 1
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.HTTP_Proxy
push dword [ebp - 4]
call esi
test eax, eax
jne 0x401207
lea eax, [ebp - 0x34c]
push eax
push 0x417be0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [0x417be0], bl
je 0x401207
lea eax, [ebp - 8]
mov dword [ebp - 8], 4
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.HTTP_ProxyPort
push dword [ebp - 4]
call esi
test eax, eax
jne 0x4011e8
mov ax, word [ebp - 0x1c]
mov word [0x40878c], ax
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x3ff
push eax
lea eax, [ebp - 0x18]
push 0x4087a0
push eax
push ebx
push str.No_Proxy
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x417be0], bl
jne 0x4014b6
cmp dword [ebp - 0xc], ebx
je 0x4012c9
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SoftwareNetscapeNetscape_NavigatorServices
push closesocket
call edi
test eax, eax
jne 0x4012bd
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0x100
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x20]
push eax
push ebx
push str.SOCKS_Server
push dword [ebp - 4]
call esi
test eax, eax
jne 0x4012b4
lea eax, [ebp - 0x34c]
push eax
push 0x417be0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [0x417be0], bl
je 0x4012b4
lea eax, [ebp - 0xc]
mov dword [0x4103c0], 1
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
push eax
push ebx
push str.SOCKS_ServerPort
mov dword [ebp - 0xc], 4
push dword [ebp - 4]
call esi
test eax, eax
jne 0x4012b4
mov ax, word [ebp - 0x14]
mov word [0x40878c], ax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x417be0], bl
jne 0x4014b6
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push closesocket
call edi
test eax, eax
jne 0x401368
lea eax, [ebp - 8]
mov dword [ebp - 8], 4
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.ProxyEnable
push dword [ebp - 4]
call esi
test eax, eax
jne 0x40135f
cmp dword [ebp - 0x14], ebx
je 0x40135f
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x200
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.ProxyServer
push dword [ebp - 4]
call esi
test eax, eax
jne 0x401340
lea eax, [ebp - 0x34c]
push eax
call fcn.004026b0
pop ecx
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x3ff
push eax
lea eax, [ebp - 0xc]
push 0x4087a0
push eax
push ebx
push str.ProxyOverride
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x417be0], bl
jne 0x4014b6
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x100
push eax
lea eax, [ebp - 0x14c]
push eax
push str.NetscapeMarkup_shellopencommand
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x4014b6
cmp byte [ebp - 0x14c], bl
je 0x4014b6
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp + eax - 0x14d]
lea ecx, [ebp - 0x14c]
cmp eax, ecx
jbe 0x4013d0
cmp byte [eax], 0x5c
je 0x4013d5
dec eax
jmp 0x4013be
cmp byte [eax], 0x5c
jne 0x4013d6
inc eax
push str.NETSCAPE.INI
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x14c]
mov esi, str.Proxy_Information
push eax
push ebx
push str.Proxy_Type
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x4014b6
lea eax, [ebp - 0x14c]
push eax
push ebx
push str.Http_ProxyPort
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov word [0x40878c], ax
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x14c]
push eax
push 0x100
push 0x417be0
push 0x408040
push str.HTTP_Proxy
push esi
call edi
lea eax, [ebp - 0x14c]
push eax
push 0x400
push 0x4087a0
push 0x408040
push str.No_Proxy
push esi
call edi
cmp byte [0x417be0], bl
jne 0x4014b6
lea eax, [ebp - 0x14c]
mov esi, str.Services
push eax
push 0x100
push 0x417be0
push 0x408040
push str.SOCKS_Server
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 [0x417be0], bl
mov word [0x40878c], ax
je 0x4014b6
mov dword [0x4103c0], 1
cmp byte [0x4087a0], bl
je 0x4014f9
mov eax, 0x4087a0
mov dl, byte [eax]
cmp dl, 0x20
je 0x4014f1
cmp dl, 9
je 0x4014f1
cmp dl, 0xd
je 0x4014f1
cmp dl, 0xa
je 0x4014f1
cmp dl, 0x2c
je 0x4014f1
cmp dl, 0x2a
jne 0x401518
cmp byte [eax + 1], 0x2e
lea ecx, [eax + 1]
jne 0x401518
mov byte [eax], 0x3b
mov eax, ecx
mov byte [eax], 0x3b
inc eax
cmp byte [eax], bl
jne 0x4014c3
push 0x417da0
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x401531
mov dword [0x40876c], 1
jmp 0x401539
cmp dl, 0x3a
jne 0x4014f4
mov byte [eax], 0x3b
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x30
jl 0x40152e
cmp cl, 0x39
jle 0x40151d
dec eax
jmp 0x4014f4
or eax, 0xffffffff
jmp 0x401b51
mov eax, dword [ebp + 0x2c]
cmp dword [ebp + 0x10], ebx
mov dword [0x408778], ebx
mov dword [0x408ba0], eax
jne 0x40159c
cmp dword [0x4103c0], ebx
mov dword [0x408778], 1
mov ecx, str.SOCKS
jne 0x401568
mov ecx, str.CERN
push ecx
movzx ecx, word [0x40878c]
push ecx
push 0x4087a0
push 0x417be0
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 [0x408ba0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [0x408ba0], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x20]
mov dword [0x40875c], eax
mov eax, dword [ebp + 8]
mov dword [0x417ce4], eax
mov eax, dword [ebp + 0x1c]
mov dword [0x408764], ecx
mov ecx, dword [ebp + 0x14]
cmp eax, ebx
mov dword [0x40873c], eax
mov dword [0x40877c], ebx
mov dword [0x4103c4], ebx
mov dword [0x408750], ebx
mov dword [0x417d80], ecx
jge 0x4015e8
or dword [0x407048], 0xffffffff
jmp 0x401a43
cmp dword [ebp + 0x10], ebx
mov eax, str.C:GLHTTP1.TMP
je 0x4015f5
mov eax, dword [ebp + 0x10]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
cmp dword [0x408784], ebx
mov dword [0x407048], eax
jne 0x4016e9
cmp eax, 0xffffffff
je 0x4016e9
push str.WININET.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x401696
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InternetOpenA
push edi
call esi
push str.InternetOpenUrlA
push edi
mov dword [0x408758], eax
call esi
push str.InternetReadFile
push edi
mov dword [0x408770], eax
call esi
push str.InternetCloseHandle
push edi
mov dword [0x417ce8], eax
call esi
push str.HttpQueryInfoA
push edi
mov dword [0x408ba4], eax
call esi
push str.InternetGetLastResponseInfoA
push edi
mov dword [0x408754], eax
call esi
push str.InternetSetOptionA
push edi
mov dword [0x408774], eax
call esi
push str.InternetErrorDlg
push edi
mov dword [0x408760], eax
call esi
mov dword [0x408768], eax
mov eax, dword [0x408758]
cmp eax, ebx
je 0x4016df
cmp dword [0x408770], ebx
je 0x4016df
cmp dword [0x417ce8], ebx
je 0x4016df
cmp dword [0x408ba4], ebx
je 0x4016df
cmp dword [0x408754], ebx
je 0x4016df
cmp dword [0x408760], ebx
je 0x4016df
cmp dword [0x408768], ebx
je 0x4016df
push ebx
push ebx
push ebx
push ebx
push str.Wise
call eax
mov dword [0x417ce0], eax
mov dword [0x408784], 1
cmp dword [0x417ce0], ebx
je 0x401a1b
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x14c], bl
mov byte [ebp - 0x44c], bl
lea edi, [ebp - 0x24c]
lea esi, [ebp - 0x24c]
mov dword [ebp + 0x2c], eax
cmp byte [eax], bl
je 0x40175f
mov eax, dword [ebp + 0x2c]
mov al, byte [eax]
cmp al, 0x3a
jne 0x40172b
mov ecx, dword [ebp + 0x2c]
sub ecx, dword [ebp + 0xc]
cmp ecx, 5
jg 0x40172f
cmp al, 0x40
jne 0x40174e
mov byte [esi], bl
cmp al, 0x3a
lea esi, [edi + 1]
lea eax, [ebp - 0x44c]
je 0x401744
lea eax, [ebp - 0x14c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x401757
cmp al, 0x2f
mov byte [esi], al
jne 0x401756
mov edi, esi
inc esi
inc dword [ebp + 0x2c]
mov eax, dword [ebp + 0x2c]
jmp 0x401713
cmp byte [ebp - 0x44c], bl
mov byte [esi], bl
mov byte [ebp - 0x84c], bl
je 0x4017ad
cmp byte [ebp - 0x14c], bl
je 0x4017ad
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0xa4c]
push eax
call fcn.004027c9
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 [0x417d00], bl
je 0x4017ed
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, 0x417d00
push edi
call esi
inc eax
push eax
push edi
push 0x2b
push dword [0x417ce0]
call dword [0x408760]
mov edi, 0x417d40
push edi
call esi
inc eax
push eax
push edi
push 0x2c
push dword [0x417ce0]
call dword [0x408760]
lea eax, [ebp - 0x84c]
push str.Accept:___r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, 0x4400000
push ebx
push edi
lea eax, [ebp - 0x84c]
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x24c]
push eax
push dword [0x417ce0]
call dword [0x408770]
cmp eax, ebx
mov dword [ebp + 0x2c], eax
je 0x401983
lea eax, [ebp + 0x1c]
mov esi, 0x20000013
push eax
lea eax, [ebp + 0x20]
push eax
lea eax, [ebp + 8]
push eax
push esi
push dword [ebp + 0x2c]
mov dword [ebp + 0x1c], ebx
mov dword [ebp + 0x20], 4
call dword [0x408754]
test eax, eax
je 0x401983
cmp dword [ebp + 8], 0x197
jne 0x4018ab
push ebx
push 7
push ebx
push dword [ebp + 0x2c]
push dword [0x417d80]
call dword [0x408768]
push ebx
push edi
lea eax, [ebp - 0x84c]
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x24c]
push eax
push dword [0x417ce0]
call dword [0x408770]
lea ecx, [ebp + 0x1c]
mov dword [ebp + 0x2c], eax
push ecx
lea ecx, [ebp + 0x20]
push ecx
lea ecx, [ebp + 8]
push ecx
push esi
push eax
call dword [0x408754]
cmp dword [ebp + 8], 0x190
jae 0x401983
lea eax, [ebp + 0x18]
mov edi, 0x4103e0
push eax
push 0x7800
push edi
push dword [ebp + 0x2c]
call dword [0x417ce8]
test eax, eax
je 0x401942
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov eax, dword [0x417ce4]
cmp dword [eax], ebx
jne 0x401942
cmp dword [ebp + 0x18], ebx
je 0x401942
push dword [ebp + 0x18]
push edi
push dword [0x407048]
call dword [sym.imp.KERNEL32.dll__lwrite]
push dword [ebp + 0x18]
call fcn.00402660
pop ecx
push 1
push ebx
push ebx
lea eax, [ebp - 0x4c]
push dword [0x417d80]
push eax
call esi
test eax, eax
je 0x40192b
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]
jmp 0x401901
lea eax, [ebp + 0x18]
push eax
push 0x7800
push edi
push dword [ebp + 0x2c]
call dword [0x417ce8]
test eax, eax
jne 0x4018da
push dword [0x407048]
call dword [sym.imp.KERNEL32.dll__lclose]
push dword [ebp + 0x2c]
or dword [0x407048], 0xffffffff
call dword [0x408ba4]
mov eax, dword [0x417ce4]
cmp dword [eax], ebx
jne 0x40197c
cmp dword [0x40877c], ebx
jl 0x40197c
mov eax, dword [0x40875c]
mov ecx, dword [0x408764]
add dword [eax], ecx
xor eax, eax
jmp 0x401b4b
cmp dword [ebp + 0x10], ebx
jne 0x401a07
cmp dword [0x408774], ebx
je 0x401a07
push str.WinInetText
mov dword [ebp + 0x2c], 0x100
push dword [0x408ba0]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [0x408ba0]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call esi
add dword [0x408ba0], eax
lea eax, [ebp + 0x2c]
push eax
lea eax, [ebp + 0x18]
push dword [0x408ba0]
push eax
call dword [0x408774]
test eax, eax
je 0x401a07
push dword [0x408ba0]
call esi
push dword [ebp + 0x18]
add dword [0x408ba0], eax
push str._r_nWinInetError_lu_r_n
push dword [0x408ba0]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [0x408ba0]
call esi
add dword [0x408ba0], eax
push dword [0x417ce0]
call dword [0x408ba4]
mov dword [0x417ce0], ebx
jmp 0x401a43
cmp dword [ebp + 0x10], ebx
jne 0x401a43
push str.WinInetNot_Found_r_n
push dword [0x408ba0]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [0x408ba0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [0x408ba0], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00401be4
pop ecx
test eax, eax
pop ecx
je 0x401a95
call fcn.004023dc
call fcn.00401b7c
cmp dword [ebp + 0x24], ebx
je 0x401ab0
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 [0x407048]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x401ab0
cmp dword [0x40877c], ebx
jl 0x401ab0
mov eax, dword [0x417ce4]
cmp dword [eax], ebx
jne 0x401ab0
mov dword [0x40877c], 0xffffffd8
mov eax, dword [0x407048]
cmp eax, 0xffffffff
je 0x401ac8
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
or dword [0x407048], 0xffffffff
cmp dword [section..data], 0xffffffff
je 0x401ae6
push dword [0x417d80]
push ebx
push ebx
push section..data
call fcn.0040224c
add esp, 0x10
cmp dword [0x408750], ebx
jne 0x401b09
cmp dword [0x40877c], ebx
jl 0x401b09
mov eax, dword [0x417ce4]
cmp dword [eax], ebx
jne 0x401b09
mov dword [0x40877c], 0xfffffffd
mov eax, dword [0x417ce4]
cmp dword [eax], ebx
jne 0x401b27
cmp dword [0x40877c], ebx
jl 0x401b27
mov eax, dword [0x40875c]
mov ecx, dword [0x408764]
add dword [eax], ecx
cmp dword [ebp + 0x10], ebx
jne 0x401b46
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.WinSockError_d_r_n
push dword [0x408ba0]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, dword [0x40877c]
mov dword [0x408ba0], ebx
pop edi
pop esi
pop ebx
leave
ret 0x28