Function at 0x4073e0
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43a33f
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x44e06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x6c], 0
lea ecx, [ebp - 0x60]
call fcn.004090d0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.004090d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.004090d0
mov byte [ebp - 4], 2
movzx eax, byte [0x4500e2]
test eax, eax
je 0x407522
push 0x4494e0
lea ecx, [ebp - 0xe4]
call fcn.00409520
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xe4]
push ecx
mov ecx, 0x450134
call fcn.00408c40
push eax
push str.evilhawk00_OpenSource_SampleUpdateService_1.0b_ver:
lea edx, [ebp - 0x15c]
push edx
call fcn.00411b90
add esp, 0xc
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xbc], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xbc]
push ecx
lea edx, [ebp - 0x144]
push edx
call fcn.00404830
add esp, 8
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xc0]
push eax
lea ecx, [ebp - 0x60]
call fcn.00408f50
lea ecx, [ebp - 0x144]
call fcn.00408f00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x15c]
call fcn.004093c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xe4]
call fcn.004093c0
jmp 0x40752f
push str.evilhawk00_OpenSource_SampleUpdateService_1.0b_NoVerInfo
lea ecx, [ebp - 0x60]
call fcn.00408e70
movzx ecx, byte [0x4500e0]
test ecx, ecx
je 0x407608
push str.ExtHost
lea ecx, [ebp - 0xfc]
call fcn.00409520
mov byte [ebp - 4], 5
lea edx, [ebp - 0xfc]
push edx
mov ecx, 0x450154
call fcn.00408c40
push eax
lea eax, [ebp - 0x174]
push eax
call fcn.00404830
add esp, 8
mov dword [ebp - 0xc4], eax
mov ecx, dword [ebp - 0xc4]
push ecx
lea ecx, [ebp - 0x48]
call fcn.00408f50
lea ecx, [ebp - 0x174]
call fcn.00408f00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xfc]
call fcn.004093c0
push str.ExtPath
lea ecx, [ebp - 0x114]
call fcn.00409520
mov byte [ebp - 4], 6
lea edx, [ebp - 0x114]
push edx
mov ecx, 0x450154
call fcn.00408c40
push eax
lea eax, [ebp - 0x18c]
push eax
call fcn.00404830
add esp, 8
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0xc8]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00408f50
lea ecx, [ebp - 0x18c]
call fcn.00408f00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x114]
call fcn.004093c0
jmp 0x407679
push str.myhostname.abcdefgblablalba.com
lea ecx, [ebp - 0x48]
call fcn.00408e70
push str.Path
lea ecx, [ebp - 0x12c]
call fcn.00409520
mov byte [ebp - 4], 7
lea edx, [ebp - 0x12c]
push edx
mov ecx, 0x450154
call fcn.00408c40
push eax
lea eax, [ebp - 0x1a4]
push eax
call fcn.00404830
add esp, 8
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x8c]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00408f50
lea ecx, [ebp - 0x1a4]
call fcn.00408f00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x12c]
call fcn.004093c0
push 0
push 0
push 0
push 1
lea ecx, [ebp - 0x60]
call fcn.00408e00
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
je 0x4076b5
push 0
push 0x50
lea ecx, [ebp - 0x48]
call fcn.00408e00
push eax
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x74], eax
jmp 0x4076f1
mov dword [ebp - 0x90], 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0x90]
jmp 0x407b75
cmp dword [ebp - 0x74], 0
je 0x40771c
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x30]
call fcn.00408e00
push eax
push 0x4495f0
mov eax, dword [ebp - 0x74]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x6c], eax
jmp 0x407768
cmp dword [ebp - 0x70], 0
je 0x40772c
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x94], 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0x94]
jmp 0x407b75
cmp dword [ebp - 0x6c], 0
je 0x407789
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x80], eax
jmp 0x4077e5
cmp dword [ebp - 0x74], 0
je 0x407799
mov eax, dword [ebp - 0x74]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x70], 0
je 0x4077a9
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x98], 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0x98]
jmp 0x407b75
cmp dword [ebp - 0x80], 0
je 0x4077ff
push 0
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x84], eax
jmp 0x40786b
cmp dword [ebp - 0x6c], 0
je 0x40780f
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x74], 0
je 0x40781f
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x70], 0
je 0x40782f
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x9c], 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0x9c]
jmp 0x407b75
cmp dword [ebp - 0x84], 0
je 0x407aa5
mov dword [ebp - 0x68], 4
push 0
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0x20000013
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp dword [ebp - 0x14], 0xc8
jne 0x407a37
push 0
push 2
push 2
push 0
push 1
push 0xc0000000
mov ecx, 0x45018c
call fcn.00408e00
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x407911
mov dword [ebp - 0xa0], 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0xa0]
jmp 0x407b75
mov dword [ebp - 0x68], 0
lea eax, [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x6c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x40793e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.00401320
add esp, 8
mov edx, dword [ebp - 0x68]
add edx, 1
push edx
call fcn.0041ae1e
add esp, 4
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
jne 0x40797b
push str.Out_of_memory_n
call fcn.00401320
add esp, 4
mov dword [ebp - 0x68], 0
jmp 0x407a21
mov ecx, dword [ebp - 0x68]
add ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x78]
push edx
call fcn.0041cb70
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x68]
push ecx
mov edx, dword [ebp - 0x78]
push edx
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x4079c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpReadData._n
call fcn.00401320
add esp, 8
jmp 0x4079e4
push 0
lea ecx, [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x68]
push edx
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0x7c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xcc], eax
mov edx, dword [ebp - 0x78]
mov dword [ebp - 0x88], edx
mov eax, dword [ebp - 0x88]
push eax
call fcn.0041aa0f
add esp, 4
cmp dword [ebp - 0x88], 0
jne 0x407a11
mov dword [ebp - 0xac], 0
jmp 0x407a21
mov dword [ebp - 0x78], 0x8123
mov ecx, dword [ebp - 0x78]
mov dword [ebp - 0xac], ecx
cmp dword [ebp - 0x68], 0
ja 0x407911
mov edx, dword [ebp - 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407aa3
cmp dword [ebp - 0x6c], 0
je 0x407a47
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x74], 0
je 0x407a57
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x70], 0
je 0x407a67
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0xb0], 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0xb0]
jmp 0x407b75
jmp 0x407b0e
cmp dword [ebp - 0x6c], 0
je 0x407ab5
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x74], 0
je 0x407ac5
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x70], 0
je 0x407ad5
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0xb4], 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0xb4]
jmp 0x407b75
cmp dword [ebp - 0x6c], 0
je 0x407b1e
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x74], 0
je 0x407b2e
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x70], 0
je 0x407b3e
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0xb8], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408f00
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408f00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00408f00
mov eax, dword [ebp - 0xb8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a9fe
mov esp, ebp
pop ebp
ret