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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 8], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
push 0
push 0
push 0
push 0
push str.WinHTTP_Example_1.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x24], 0x2020
push 4
lea eax, [ebp - 0x24]
push eax
push 0x54
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov dword [ebp - 0x1c], eax
push 0
push 0xffffffffffffffff
push 0x40dc40
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
cmp dword [ebp - 0xc], 0
je 0x40dd1b
push 0
push 0x1bb
push str.www.dmo.gov.uk
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40dd40
push 0x800000
push 0
push 0
push 0
push 0
push 0x44ddd0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], 0x3300
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 4
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x20]
push eax
push 7
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
mov edx, dword [ebp - 0x20]
push edx
push str.timeout__d__n
call fcn.00401450
add esp, 8
push 4
lea eax, [ebp - 0x2c]
push eax
push 0x1f
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40dda9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpSetOption._n
call fcn.00401450
add esp, 8
cmp dword [ebp - 4], 0
je 0x40ddc8
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40dddd
push 0
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40deba
mov dword [ebp - 8], 0
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x40de14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d_in_WinHttpQueryDataAvailable._n
call fcn.00401450
add esp, 8
mov eax, dword [ebp - 8]
add eax, 1
push eax
call fcn.004154cd
add esp, 4
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
jne 0x40de48
push str.Out_of_memory_n
call fcn.00401450
add esp, 4
mov dword [ebp - 8], 0
jmp 0x40deb0
mov edx, dword [ebp - 8]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x10]
push eax
call fcn.00417ec0
add esp, 0xc
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x40de8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d_in_WinHttpReadData._n
call fcn.00401450
add esp, 8
jmp 0x40de9e
mov edx, dword [ebp - 0x10]
push edx
push 0x44de60
call fcn.00401450
add esp, 8
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004151cd
add esp, 4
cmp dword [ebp - 8], 0
ja 0x40dde7
cmp dword [ebp - 0x14], 0
jne 0x40ded4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x44de64
call fcn.00401450
add esp, 8
cmp dword [ebp - 4], 0
je 0x40dee4
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x18], 0
je 0x40def4
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0xc], 0
je 0x40df04
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor eax, eax
mov esp, ebp
pop ebp
ret