Function at 0x405800
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x471218
mov eax, dword fs:[0]
push eax
sub esp, 0x84
push ebx
push esi
push edi
mov eax, dword [0x4811c4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x18], 0
mov esi, 0x1f
mov dword [ebp - 0x1c], ebx
call fcn.004109a0
lea eax, [ebp - 0x84]
mov dword [ebp - 4], ebx
push eax
push ebx
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x84], 0x3c
mov dword [ebp - 0x70], 0xffffffff
mov dword [ebp - 0x54], 0xffffffff
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x4058c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.CrackUrl_error__d_has_occurred._n
call fcn.00405650
add esp, 8
xor eax, eax
jmp 0x405c10
push dword [ebp - 0x70]
push dword [ebp - 0x74]
call fcn.00409db0
push dword [ebp - 0x54]
mov ebx, eax
push dword [ebp - 0x58]
mov dword [ebp - 0x24], ebx
call fcn.00409db0
add esp, 0x10
mov dword [ebp + 8], eax
test eax, eax
je 0x405c0b
test ebx, ebx
je 0x405c0b
xor edi, edi
cmp dword [ebp - 0x78], 2
jne 0x4058fe
mov edi, 1
push 0
push 0
push 0
push 0
push str.WinHTTP_VTPInfo_1.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x405936
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Open_error__d_has_occurred._n
call fcn.00405650
mov eax, dword [ebp + 8]
add esp, 8
jmp 0x405c10
push 0
push 0
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x20], ecx
test ecx, ecx
jne 0x405975
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push str.Connect__S_error__d_has_occurred._n
call fcn.00405650
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 0xc
push dword [ebp - 0x28]
call edi
mov eax, dword [ebp + 8]
jmp 0x405c10
shl edi, 0x17
push edi
push 0
push 0
push 0
push dword [ebp + 8]
push 0x474a84
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
test ebx, ebx
jne 0x4059b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.OpenRequest_error__d_has_occurred._n
call fcn.00405650
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 8
jmp 0x405bf9
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x4059df
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Send_error__d_has_occurred._n
jmp 0x405be8
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x405a00
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error__d_has_occurred._n
jmp 0x405be8
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x405bda
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x405aaf
inc eax
push eax
call fcn.004067a0
mov edi, eax
add esp, 4
test edi, edi
je 0x405ba4
mov ecx, dword [ebp - 0x10]
inc ecx
push ecx
push 0
push edi
call fcn.00423060
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x10]
push edi
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x405af7
push edi
lea ecx, [ebp - 0x90]
call fcn.004106c0
lea eax, [ebp - 0x90]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00411200
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x90]
call fcn.00410a40
push edi
call fcn.004067c0
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x405bf0
cmp dword [ebp - 0x10], 0
ja 0x405a00
mov dword [ebp - 0x3c], 0
mov ecx, 0x8000
mov dword [ebp - 0x38], 0
mov eax, str.mfevtpa.dll
mov dword [ebp - 0x48], str.mfevtpa.dll
mov dword [ebp - 0x40], 0
cmp word [eax], 0
je 0x405b0a
add eax, 2
sub ecx, 1
jne 0x405ad5
test ecx, ecx
jne 0x405b0a
mov esi, 0x57
push esi
push str.Error__u_creating_VTP_control_n
jmp 0x405be8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error__u_in_WinHttpReadData._n
jmp 0x405be8
mov eax, 0x8000
sub eax, ecx
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x48]
push eax
call fcn.00401c40
mov esi, eax
test esi, esi
jne 0x405b73
mov edi, dword [ebp - 0x38]
test edi, edi
je 0x405b64
push str.NotComDllGetInterface
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405b53
lea ecx, [ebp - 0x14]
push ecx
push str.VtpUtils
call eax
add esp, 8
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x405b73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x405b73
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x405b73
lea esi, [eax + 2]
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x405b83
push eax
call fcn.0042c6a2
add esp, 4
test esi, esi
je 0x405b8f
push esi
push str.Error__u_creating_VTP_control_n
jmp 0x405be8
lea eax, [ebp - 0x34]
push eax
call fcn.00411ee0
mov edx, eax
add esp, 4
mov dword [ebp - 0x1c], edx
test edx, edx
jne 0x405bb8
push str.Out_of_memory_n
call fcn.00405650
add esp, 4
mov esi, 8
jmp 0x405bf0
mov ecx, dword [ebp - 0x14]
push edx
mov eax, dword [ecx]
call dword [eax + 0x28]
mov esi, eax
test esi, esi
je 0x405bd6
push str.Error:_downloaded_data_could_not_be_parsed_or_verified_n
call fcn.00405650
add esp, 4
jmp 0x405bf0
xor esi, esi
jmp 0x405bf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.00405650
add esp, 8
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call edi
push dword [ebp - 0x20]
call edi
push dword [ebp - 0x28]
mov ebx, dword [ebp - 0x24]
call edi
mov eax, dword [ebp + 8]
jmp 0x405c10
mov esi, 8
push eax
call fcn.0040bbf0
push ebx
call fcn.0040bbf0
push dword [ebp - 0x1c]
call fcn.0040bbd0
lea eax, [ebp - 0x34]
push eax
call fcn.00411390
mov ecx, dword [ebp - 0x14]
add esp, 0x10
test ecx, ecx
je 0x405c3c
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x34]
call fcn.00410a40
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4