Function at 0x401d5f
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 0x401d9c
mov ecx, dword [0x4118e0]
cmp ecx, ebx
je 0x401d92
mov eax, dword [0x411868]
cmp eax, ebx
je 0x401d92
push ecx
call eax
mov dword [0x4118e0], ebx
mov dword [0x411850], ebx
call sub.WSOCK32.dll_WSACleanup
jmp 0x4028c2
cmp dword [0x419580], ebx
push esi
push edi
jne 0x402282
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
lea eax, [ebp - 0x10]
push eax
push 0x4118a0
push str.WebDeployProxyUsername
mov edi, closesocket
push edi
mov word [0x41185c], 0x50
mov byte [0x411d20], bl
mov byte [0x4118a0], bl
mov byte [0x411900], bl
mov byte [0x4195a0], bl
mov dword [ebp - 0x10], 0x40
call esi
test eax, eax
je 0x401df8
mov byte [0x4118a0], bl
lea eax, [ebp - 0x10]
push eax
push 0x411d20
push str.WebDeployProxyPassword
push edi
mov dword [ebp - 0x10], 0x40
call esi
test eax, eax
je 0x401e1a
mov byte [0x411d20], 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 0x401e79
cmp byte [ebp - 0x34c], 0x31
jne 0x402261
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 0x402261
lea eax, [ebp - 0x34c]
push eax
call fcn.004010f5
pop ecx
jmp 0x402261
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 0x40201c
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 0x401f66
cmp dword [ebp - 0x1c], ebx
mov dword [ebp - 8], 0x100
je 0x401f66
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 0x401f66
lea eax, [ebp - 0x34c]
push eax
push 0x4195a0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [0x4195a0], bl
je 0x401f66
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 0x401f47
mov ax, word [ebp - 0x1c]
mov word [0x41185c], ax
lea eax, [ebp - 8]
push eax
push 0x411900
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 [0x4195a0], bl
jne 0x402217
cmp dword [ebp - 0xc], ebx
je 0x402028
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SoftwareNetscapeNetscape_NavigatorServices
push closesocket
call edi
test eax, eax
jne 0x40201c
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 0x402013
lea eax, [ebp - 0x34c]
push eax
push 0x4195a0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [0x4195a0], bl
je 0x402013
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 [0x411d60], 1
mov dword [ebp - 0xc], 4
call esi
test eax, eax
jne 0x402013
mov ax, word [ebp - 0x14]
mov word [0x41185c], ax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x4195a0], bl
jne 0x402217
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push closesocket
call edi
test eax, eax
jne 0x4020c7
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 0x4020be
cmp dword [ebp - 0x14], ebx
je 0x4020be
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 0x40209f
lea eax, [ebp - 0x34c]
push eax
call fcn.004010f5
pop ecx
lea eax, [ebp - 8]
push eax
push 0x411900
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 [0x4195a0], bl
jne 0x402217
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 0x402217
cmp byte [ebp - 0x14c], bl
je 0x402217
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x14c]
dec ecx
add eax, ecx
jmp 0x402127
cmp byte [eax], 0x5c
je 0x402136
dec eax
lea ecx, [ebp - 0x14c]
cmp eax, ecx
ja 0x402121
cmp byte [eax], 0x5c
jne 0x402137
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 0x402217
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 [0x41185c], ax
lea eax, [ebp - 0x14c]
push eax
push 0x100
push 0x4195a0
push 0x40747d
push str.HTTP_Proxy
push esi
call edi
lea eax, [ebp - 0x14c]
push eax
push 0x400
push 0x411900
push 0x40747d
push str.No_Proxy
push esi
call edi
cmp byte [0x4195a0], bl
jne 0x402217
lea eax, [ebp - 0x14c]
push eax
push 0x100
push 0x4195a0
push 0x40747d
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 [0x4195a0], bl
mov word [0x41185c], ax
je 0x402217
mov dword [0x411d60], 1
cmp byte [0x411900], bl
je 0x402261
mov eax, 0x411900
mov dl, byte [eax]
cmp dl, 0x20
je 0x402259
cmp dl, 9
je 0x402259
cmp dl, 0xd
je 0x402259
cmp dl, 0xa
je 0x402259
cmp dl, 0x2c
je 0x402259
cmp dl, 0x2a
jne 0x402331
lea ecx, [eax + 1]
cmp byte [ecx], 0x2e
jne 0x402331
mov byte [eax], 0x3b
mov eax, ecx
mov byte [eax], 0x3b
inc eax
cmp byte [eax], bl
jne 0x402224
push 0x4196c0
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x402350
mov dword [0x419580], 1
cmp dword [ebp + 0x10], ebx
mov eax, dword [ebp + 0x2c]
mov dword [0x411854], ebx
mov dword [0x41958c], eax
jne 0x4022e5
cmp dword [0x411d60], ebx
mov dword [0x411854], 1
mov ecx, str.SOCKS
jne 0x4022b1
mov ecx, str.CERN
push ecx
movzx ecx, word [0x41185c]
push ecx
push 0x411900
push 0x4195a0
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 [0x41958c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [0x41958c], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x20]
mov dword [0x411860], eax
mov eax, dword [ebp + 8]
mov dword [0x41186c], eax
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
mov dword [0x411d64], ecx
mov ecx, dword [ebp + 0x14]
mov dword [0x411864], eax
mov dword [0x411d00], ebx
mov dword [0x411d68], ebx
mov dword [0x411874], ebx
mov dword [0x4196a0], ecx
jge 0x402358
or dword [0x40904c], 0xffffffff
jmp 0x4027b2
cmp dl, 0x3a
jne 0x40225c
jmp 0x402341
cmp byte [eax], 0x39
jg 0x40234a
mov byte [eax], 0x3b
inc eax
cmp byte [eax], 0x30
jge 0x40233c
dec eax
jmp 0x40225c
or eax, 0xffffffff
jmp 0x4028c0
cmp dword [ebp + 0x10], ebx
mov eax, str.C:GLHTTP1.TMP
je 0x402365
mov eax, dword [ebp + 0x10]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
cmp dword [0x411850], ebx
mov dword [0x40904c], eax
jne 0x402459
cmp eax, 0xffffffff
je 0x402459
push str.WININET.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x402406
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InternetOpenA
push edi
call esi
push str.InternetOpenUrlA
push edi
mov dword [0x419584], eax
call esi
push str.InternetReadFile
push edi
mov dword [0x419590], eax
call esi
push str.InternetCloseHandle
push edi
mov dword [0x411858], eax
call esi
push str.HttpQueryInfoA
push edi
mov dword [0x411868], eax
call esi
push str.InternetGetLastResponseInfoA
push edi
mov dword [0x419588], eax
call esi
push str.InternetSetOptionA
push edi
mov dword [0x411870], eax
call esi
push str.InternetErrorDlg
push edi
mov dword [0x4118e4], eax
call esi
mov dword [0x411880], eax
mov eax, dword [0x419584]
cmp eax, ebx
je 0x40244f
cmp dword [0x419590], ebx
je 0x40244f
cmp dword [0x411858], ebx
je 0x40244f
cmp dword [0x411868], ebx
je 0x40244f
cmp dword [0x419588], ebx
je 0x40244f
cmp dword [0x4118e4], ebx
je 0x40244f
cmp dword [0x411880], ebx
je 0x40244f
push ebx
push ebx
push ebx
push ebx
push str.Wise
call eax
mov dword [0x4118e0], eax
mov dword [0x411850], 1
cmp dword [0x4118e0], ebx
je 0x40278a
mov eax, dword [ebp + 0xc]
cmp byte [eax], bl
lea edi, [ebp - 0x24c]
mov byte [ebp - 0x14c], bl
mov byte [ebp - 0x44c], bl
mov esi, edi
mov dword [ebp + 0x2c], eax
je 0x4024ce
mov dword [ebp + 0x18], ebx
mov eax, dword [ebp + 0x2c]
mov al, byte [eax]
cmp al, 0x3a
jne 0x402495
cmp dword [ebp + 0x18], 5
jg 0x402499
cmp al, 0x40
jne 0x4024b8
mov byte [esi], bl
cmp al, 0x3a
lea esi, [edi + 1]
lea eax, [ebp - 0x44c]
je 0x4024ae
lea eax, [ebp - 0x14c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x4024c1
cmp al, 0x2f
mov byte [esi], al
jne 0x4024c0
mov edi, esi
inc esi
inc dword [ebp + 0x2c]
mov eax, dword [ebp + 0x2c]
inc dword [ebp + 0x18]
cmp byte [eax], bl
jne 0x402486
cmp byte [ebp - 0x44c], bl
mov byte [esi], bl
mov byte [ebp - 0x84c], bl
je 0x40251c
cmp byte [ebp - 0x14c], bl
je 0x40251c
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0xa4c]
push eax
call fcn.0040120b
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 [0x4118a0], bl
je 0x40255c
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, 0x4118a0
push edi
call esi
inc eax
push eax
push edi
push 0x2b
push dword [0x4118e0]
call dword [0x4118e4]
mov edi, 0x411d20
push edi
call esi
inc eax
push eax
push edi
push 0x2c
push dword [0x4118e0]
call dword [0x4118e4]
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 [0x4118e0]
call dword [0x419590]
cmp eax, ebx
mov dword [ebp + 0x2c], eax
je 0x4026f2
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 [0x419588]
test eax, eax
je 0x4026f2
cmp dword [ebp + 8], 0x197
jne 0x40261a
push ebx
push 7
push ebx
push dword [ebp + 0x2c]
push dword [0x4196a0]
call dword [0x411880]
push ebx
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x84c]
push eax
lea eax, [ebp - 0x24c]
push eax
push dword [0x4118e0]
call dword [0x419590]
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 [0x419588]
cmp dword [ebp + 8], 0x190
jae 0x4026f2
lea eax, [ebp + 0x18]
push eax
push 0x7800
mov edi, 0x411d80
push edi
push dword [ebp + 0x2c]
call dword [0x411858]
test eax, eax
je 0x4026b1
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov eax, dword [0x41186c]
cmp dword [eax], ebx
jne 0x4026b1
cmp dword [ebp + 0x18], ebx
je 0x4026b1
push dword [ebp + 0x18]
push edi
push dword [0x40904c]
call dword [sym.imp.KERNEL32.dll__lwrite]
push dword [ebp + 0x18]
call fcn.0040109b
pop ecx
jmp 0x402686
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 [0x4196a0]
lea eax, [ebp - 0x4c]
push eax
call esi
test eax, eax
jne 0x402672
lea eax, [ebp + 0x18]
push eax
push 0x7800
push edi
push dword [ebp + 0x2c]
call dword [0x411858]
test eax, eax
jne 0x402649
push dword [0x40904c]
call dword [sym.imp.KERNEL32.dll__lclose]
push dword [ebp + 0x2c]
or dword [0x40904c], 0xffffffff
call dword [0x411868]
mov eax, dword [0x41186c]
cmp dword [eax], ebx
jne 0x4026eb
cmp dword [0x411d00], ebx
jl 0x4026eb
mov eax, dword [0x411860]
mov ecx, dword [0x411d64]
add dword [eax], ecx
xor eax, eax
jmp 0x4028ba
cmp dword [ebp + 0x10], ebx
jne 0x402776
cmp dword [0x411870], ebx
je 0x402776
push str.WinInetText
push dword [0x41958c]
mov dword [ebp + 0x2c], 0x100
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [0x41958c]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call esi
add dword [0x41958c], eax
lea eax, [ebp + 0x2c]
push eax
push dword [0x41958c]
lea eax, [ebp + 0x18]
push eax
call dword [0x411870]
test eax, eax
je 0x402776
push dword [0x41958c]
call esi
push dword [ebp + 0x18]
add dword [0x41958c], eax
push str._r_nWinInetError_lu_r_n
push dword [0x41958c]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [0x41958c]
call esi
add dword [0x41958c], eax
push dword [0x4118e0]
call dword [0x411868]
mov dword [0x4118e0], ebx
jmp 0x4027b2
cmp dword [ebp + 0x10], ebx
jne 0x4027b2
push str.WinInetNot_Found_r_n
push dword [0x41958c]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [0x41958c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [0x41958c], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00401802
test eax, eax
pop ecx
pop ecx
je 0x402804
call fcn.00401487
call fcn.00401022
cmp dword [ebp + 0x24], ebx
je 0x40281f
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 [0x40904c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40281f
cmp dword [0x411d00], ebx
jl 0x40281f
mov eax, dword [0x41186c]
cmp dword [eax], ebx
jne 0x40281f
mov dword [0x411d00], 0xffffffd8
mov eax, dword [0x40904c]
cmp eax, 0xffffffff
je 0x402837
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
or dword [0x40904c], 0xffffffff
cmp dword [section..data], 0xffffffff
je 0x402855
push dword [0x4196a0]
push ebx
push ebx
push section..data
call fcn.004012f2
add esp, 0x10
cmp dword [0x411874], ebx
jne 0x402878
cmp dword [0x411d00], ebx
jl 0x402878
mov eax, dword [0x41186c]
cmp dword [eax], ebx
jne 0x402896
mov dword [0x411d00], 0xfffffffd
mov eax, dword [0x41186c]
cmp dword [eax], ebx
jne 0x402896
cmp dword [0x411d00], ebx
jl 0x402896
mov eax, dword [0x411860]
mov ecx, dword [0x411d64]
add dword [eax], ecx
cmp dword [ebp + 0x10], ebx
jne 0x4028b5
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.WinSockError_d_r_n
push dword [0x41958c]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, dword [0x411d00]
mov dword [0x41958c], ebx
pop edi
pop esi
pop ebx
leave
ret 0x28