Function at 0x40d065
Capabilities:
Check http status code
Connect to http server
Create http request
Create thread
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e521
mov eax, dword fs:[0]
push eax
mov eax, 0x1fec
call fcn.00441ba0
mov eax, dword [0x4849a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
push 0x467314
lea ecx, [ebp - 0x1fb8]
mov dword [ebp - 0x1fc0], ebx
mov dword [ebp - 0x1fb4], eax
call fcn.00403310
xor esi, esi
push 0xfce
lea eax, [ebp - 0x1f9a]
push esi
mov dword [ebp - 4], esi
push eax
mov byte [ebp - 0x1fa1], 0
mov word [ebp - 0x1f9c], si
call fcn.0043d8e0
add esp, 0xc
mov word [ebp - 0xbe4], si
mov esi, 0x3e6
push esi
lea eax, [ebp - 0xbe2]
push 0
push eax
call fcn.0043d8e0
and word [ebp - 0x7fc], 0
add esp, 0xc
push esi
lea eax, [ebp - 0x7fa]
push 0
push eax
call fcn.0043d8e0
mov eax, 0x1f4
add esp, 0xc
cmp dword [0x489358], 1
mov dword [ebp - 0x1fec], eax
mov dword [ebp - 0x1fe4], eax
mov dword [ebp - 0x1ff4], 0xfd0
jne 0x40d177
push str.User_once_clicked_on_Cancel_IE_proxy_dialog
call fcn.00409842
mov esi, dword [0x489358]
pop ecx
mov ecx, dword [ebp - 0x1fb8]
add ecx, 0xfffffff0
call fcn.00401109
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043a2d7
leave
ret 4
push dword [0x489474]
lea ecx, [ebp - 0x1fcc]
call fcn.00406339
mov eax, dword [eax]
xor esi, esi
push esi
push esi
push esi
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ecx, dword [ebp - 0x1fcc]
add ecx, 0xfffffff0
mov dword [edi + 0xa0], eax
call fcn.00401109
cmp dword [edi + 0xa0], esi
jne 0x40d1cb
push str.Error_in_configuring_default_proxy_setting
call fcn.00409842
pop ecx
push esi
mov eax, edi
call fcn.0040c38b
push 6
pop esi
jmp 0x40d14c
push 0x467314
lea ecx, [ebp - 0x1fa8]
call fcn.00403310
lea esi, [ebp - 0x1fa8]
mov byte [ebp - 4], 1
call fcn.0040b8a8
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx]
xor esi, esi
push esi
push esi
push 3
push eax
movzx eax, word [ebx + 0x18]
push ecx
push eax
push edx
push dword [edi + 0xa0]
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, esi
mov dword [edi + 0xa4], eax
jne 0x40d239
push str.Error_in_establishing_connection_with_server
call fcn.00409842
pop ecx
push esi
mov eax, edi
call fcn.0040c38b
mov ecx, dword [ebp - 0x1fa8]
add ecx, 0xfffffff0
call fcn.00401109
jmp 0x40d1c6
mov ecx, dword [ebx + 0x10]
cmp dword [ebx + 0x18], 0x1bb
mov ebx, dword [ebx + 0x14]
push esi
jne 0x40d250
push 0x84c01000
jmp 0x40d255
push 0x4000000
push esi
push esi
push str.HTTP_1.1
push ecx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, esi
mov dword [edi + 0xa8], eax
jne 0x40d276
push str.Error_in_accessing_desired_url
jmp 0x40d21b
mov ebx, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
pop esi
push esi
lea ecx, [ebp - 0x1fd4]
push ecx
push 0x1f
push eax
mov dword [ebp - 0x1fd4], 0x80
call ebx
push esi
lea eax, [ebp - 0x1fdc]
push eax
push 0x1f
push dword [edi + 0xa8]
mov dword [ebp - 0x1fdc], 0x2000
call ebx
push esi
lea eax, [ebp - 0x1fd8]
push eax
push 0x1f
push dword [edi + 0xa8]
mov dword [ebp - 0x1fd8], 0x1000
call ebx
push esi
lea eax, [ebp - 0x1fd0]
push eax
push 0x1f
push dword [edi + 0xa8]
mov dword [ebp - 0x1fd0], 0x100
call ebx
call fcn.0041ef9c
push eax
lea ecx, [ebp - 0x1fb0]
call fcn.00406449
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x1fc0]
mov eax, dword [esi + 0x1c]
mov ecx, dword [eax - 0xc]
push 1
push ecx
push eax
push dword [edi + 0xa8]
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
push dword [esi + 0xc]
lea ecx, [ebp - 0x1fac]
call fcn.00403354
jmp 0x40d6e2
mov esi, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
lea eax, [ebp - 0x1fe0]
push eax
push dword [ebp - 0x1fa0]
call esi
cmp dword [ebp - 0x1fa0], 0
je 0x40d358
push dword [ebp - 0x1fa0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1fe0]
cmp eax, 0x320
jne 0x40d9fb
lea eax, [ebp - 0x1ff8]
push eax
push dword [0x489360]
call esi
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0
lea eax, [ebp - 0x1ff4]
push eax
lea eax, [ebp - 0x1f9c]
push eax
push 0x16
push dword [edi + 0xa8]
call esi
push 0
lea eax, [ebp - 0x1fcc]
push eax
push dword [ebp - 0x1fb4]
push 0x20000013
push dword [edi + 0xa8]
call esi
test eax, eax
je 0x40d805
push 0x467314
lea ecx, [ebp - 0x1fb8]
call fcn.0040387a
mov eax, dword [ebp - 0x1fb4]
mov eax, dword [eax]
lea esi, [ebp - 0x1fb8]
call fcn.0040b4a0
mov eax, dword [ebp - 0x1fb4]
cmp dword [eax], 0xc8
jne 0x40d4e1
cmp dword [0x4894b8], 0
jne 0x40d4e1
push 0x3ff
lea eax, [ebp - 0x413]
push 0
push eax
mov dword [ebp - 0x1fa0], 0x400
mov byte [ebp - 0x414], 0
call fcn.0043d8e0
add esp, 0xc
lea eax, [ebp - 0x1fa0]
push eax
lea eax, [ebp - 0x414]
push eax
push 0x26
push dword [edi + 0xa0]
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
test eax, eax
jne 0x40d45c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Query_for_InternetProxyOption_Failed_:__d
call fcn.00409842
pop ecx
jmp 0x40d4e0
push 3
pop esi
cmp dword [ebp - 0x414], esi
jne 0x40d4c5
push str.InternetQuery_on_Preconfig_gives_Proxy_Access_Type
call fcn.00409842
pop ecx
push dword [ebp - 0x410]
lea ecx, [ebp - 0x1fc4]
mov dword [0x4894b8], esi
call fcn.00403310
push 1
push 0x4894b0
push 0x4894a8
push ecx
mov byte [ebp - 4], 4
lea eax, [ebp - 0x1fc4]
mov dword [ebp - 0x1fc8], esp
mov ecx, esp
push eax
call fcn.0040359e
call fcn.0040c3c5
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1fc4]
add ecx, 0xfffffff0
call fcn.00401109
xor esi, esi
inc esi
cmp dword [ebp - 0x414], esi
jne 0x40d4e1
push str.InternetQuery_on_Preconfig_gives_Direct_Access_Type
call fcn.00409842
mov dword [0x4894b8], esi
pop ecx
mov eax, dword [ebp - 0x1fb4]
mov eax, dword [eax]
mov esi, 0x197
cmp eax, esi
jne 0x40d50c
cmp dword [0x48935c], 1
je 0x40d814
cmp dword [0x4894c4], 1
je 0x40d84e
cmp byte [ebp - 0x1fa1], 0
je 0x40d5c9
cmp eax, esi
je 0x40d5d7
lea eax, [ebp - 0x1fec]
push eax
lea eax, [ebp - 0xbe4]
push eax
push 0x2b
push dword [edi + 0xa8]
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
mov dword [ebp - 0x1fc8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1fe8], eax
lea eax, [ebp - 0x1fe4]
push eax
lea eax, [ebp - 0x7fc]
push eax
push 0x2c
push dword [edi + 0xa8]
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
mov dword [ebp - 0x1ff0], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1fa0], eax
lea eax, [ebp - 0xbe4]
push eax
mov ecx, 0x489488
call fcn.0040387a
lea eax, [ebp - 0x7fc]
push eax
mov ecx, 0x48948c
call fcn.0040387a
call fcn.0040b931
push dword [ebp - 0x1fa0]
push dword [ebp - 0x1fe8]
push dword [ebp - 0x1ff0]
push dword [ebp - 0x1fc8]
push str.URes__d_PRes__d__ER1_:__d_ER2_:__d
call fcn.00409842
add esp, 0x14
mov eax, dword [ebp - 0x1fb4]
cmp dword [eax], esi
jne 0x40d8ba
push 0
push 7
push 0x2eee
push dword [edi + 0xa8]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
cmp eax, 0x2f00
jne 0x40d874
push str.IE:User_press_Ok
mov byte [ebp - 0x1fa1], 1
call fcn.00409842
pop ecx
mov ecx, dword [ebp - 0x1fac]
add ecx, 0xfffffff0
call fcn.00401109
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x1fb0]
add ecx, 0xfffffff0
call fcn.00401109
push 4
lea eax, [ebp - 0x1fd4]
push eax
push 0x1f
pop esi
push esi
push dword [edi + 0xa8]
mov dword [ebp - 0x1fd4], 0x80
call ebx
push 4
lea eax, [ebp - 0x1fdc]
push eax
push esi
push dword [edi + 0xa8]
mov dword [ebp - 0x1fdc], 0x2000
call ebx
push 4
lea eax, [ebp - 0x1fd8]
push eax
push esi
push dword [edi + 0xa8]
mov dword [ebp - 0x1fd8], 0x1000
call ebx
push 4
lea eax, [ebp - 0x1fd0]
push eax
push esi
push dword [edi + 0xa8]
mov dword [ebp - 0x1fd0], 0x100
call ebx
call fcn.0041ef9c
push eax
lea ecx, [ebp - 0x1fb0]
call fcn.00406449
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x1fc0]
mov eax, dword [esi + 0x1c]
mov ecx, dword [eax - 0xc]
push 1
push ecx
push eax
push dword [edi + 0xa8]
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
push dword [esi + 0xc]
lea ecx, [ebp - 0x1fac]
call fcn.00403354
push 0xc
mov byte [ebp - 4], 3
and dword [ebp - 0x1fbc], 0
push 1
mov dword [ebp - 0x1fcc], 4
call fcn.0043b447
pop ecx
pop ecx
xor ecx, ecx
push ecx
push ecx
push eax
push 0x40c698
push ecx
mov dword [eax], edi
push ecx
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push dword [esi + 0x24]
mov dword [ebp - 0x1fa0], eax
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40d32e
push str.SendWebRequest_Thread_is_not_closed
call fcn.00409842
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
pop ecx
call ebx
push dword [edi + 0xa0]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x1fc4], eax
call esi
push dword [edi + 0xa4]
call esi
push dword [edi + 0xa8]
call esi
push 0x46733a
lea ecx, [ebp - 0x1fb8]
call fcn.004033a2
push dword [ebp - 0x1fc4]
lea ecx, [ebp - 0x1fb8]
call fcn.0040b6f8
push 0
lea ecx, [ebp - 0x1fb8]
call fcn.004036cd
push eax
push dword [ebp - 0x1fc4]
push str.Send_Req___Error_accessing_result_:__d___s
call fcn.00409842
and dword [ebp - 0x1fc0], 0
add esp, 0xc
lea eax, [ebp - 0x1fc0]
push eax
push dword [ebp - 0x1fa0]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x40d7d2
call ebx
push eax
push str.Exit_send_webreq_thread_is_failed__error_code__d
jmp 0x40d7dd
push dword [ebp - 0x1fc0]
push str.Thread_Status_:__d
call fcn.00409842
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1fac]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fb0]
add ecx, 0xfffffff0
call fcn.00401109
jmp 0x40d229
mov eax, dword [ebp - 0x1fb4]
push dword [eax]
push str.Error_in_accessing_result_page_Status_code___d
jmp 0x40d7dd
push str.Proxy_problem.
call fcn.00409842
pop ecx
mov ecx, dword [ebp - 0x1fac]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fb0]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fa8]
add ecx, 0xfffffff0
call fcn.00401109
jmp 0x40d14c
push ecx
lea eax, [ebp - 0x1fb8]
mov dword [ebp - 0x1fc8], esp
mov ecx, esp
push eax
call fcn.0040359e
mov esi, dword [ebp - 0x1fb4]
push dword [esi]
call fcn.0040cf37
mov esi, dword [esi]
jmp 0x40d81f
push str.IE:User_press_cancel
mov dword [0x489358], 1
call fcn.00409842
pop ecx
mov ecx, dword [ebp - 0x1fac]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fb0]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fa8]
add ecx, 0xfffffff0
call fcn.00401109
push 8
jmp 0x40d1c8
mov eax, dword [eax]
cmp eax, 0xc8
je 0x40d8df
mov ecx, dword [ebp - 0x1fc0]
push dword [ecx + 0x10]
push eax
push str.Error:_d_Page:_s
call fcn.004098d8
add esp, 0xc
jmp 0x40d7e4
lea eax, [ebp - 0x1fa0]
push eax
call fcn.00406323
mov byte [ebp - 4], 5
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x40d96c
mov eax, dword [ebp - 0x1fbc]
test eax, eax
je 0x40d991
inc eax
push eax
lea ecx, [ebp - 0x1fa0]
call fcn.00406573
push dword [ebp - 0x1fbc]
lea ecx, [ebp - 0xfcc]
push ecx
push eax
call fcn.0043d7b0
mov eax, dword [ebp - 0x1fbc]
add esp, 0xc
lea esi, [ebp - 0x1fa0]
call fcn.0040dd53
push dword [ebp - 0x1fa0]
lea ecx, [ebp - 0x1fc8]
call fcn.00403354
lea ecx, [edi + 0xb0]
push eax
mov byte [ebp - 4], 6
call fcn.00403609
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x1fc8]
add ecx, 0xfffffff0
call fcn.00401109
lea eax, [ebp - 0x1fbc]
push eax
push 0x3e8
lea eax, [ebp - 0xfcc]
push eax
push dword [edi + 0xa8]
call ebx
test eax, eax
jne 0x40d8f7
jmp 0x40d99e
push 0
lea ecx, [edi + 0xb0]
call fcn.0040dec9
push dword [edi + 0xa0]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [edi + 0xa4]
call esi
push dword [edi + 0xa8]
call esi
mov ecx, dword [ebp - 0x1fa0]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fac]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fb0]
add ecx, 0xfffffff0
call fcn.00401109
mov ecx, dword [ebp - 0x1fa8]
add ecx, 0xfffffff0
call fcn.00401109
push 7
jmp 0x40d1c8
mov ecx, dword [ebp - 0x1fb4]
mov dword [ecx], eax
jmp 0x40d7e4