Function at 0x41be51
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x47a008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x288], eax
mov ebx, ecx
mov ecx, dword [ebp + 8]
xor eax, eax
and dword [ebp - 0x21c], eax
mov dword [ebp - 0x284], edx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x278], ecx
mov dword [ebp - 0x274], eax
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x250], eax
push esi
mov esi, eax
mov dword [ebp - 0x218], esi
push edi
mov edi, eax
test edx, edx
jne 0x41bef8
mov ecx, 0x80070057
mov ebx, ecx
call fcn.004298bc
jmp 0x41c605
test ebx, ebx
je 0x41bee7
test ecx, ecx
je 0x41bee7
push 0x3c
lea eax, [ebp - 0x2dc]
push 0
push eax
call sub.msvcrt.dll_memset
or dword [ebp - 0x2c8], 0xffffffff
lea eax, [ebp - 0x2dc]
or dword [ebp - 0x2ac], 0xffffffff
add esp, 0xc
mov dword [ebp - 0x2dc], 0x3c
push eax
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x41bf54
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.004263e0
mov ebx, eax
mov ecx, ebx
jmp 0x41beee
push ecx
mov ecx, dword [ebp - 0x2cc]
lea eax, [ebp - 0x274]
push eax
push 0x2f
pop edx
call fcn.00426273
mov ebx, eax
test ebx, ebx
js 0x41bf50
xor eax, eax
mov esi, 0x408e38
cmp dword [ebp - 0x2d0], 2
sete al
mov dword [ebp - 0x27c], eax
test eax, eax
jne 0x41bf90
mov esi, 0x408e44
xor ebx, ebx
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
movzx eax, word [ebp - 0x2c4]
push 0x408dd0
push ecx
push 0x198
push ebx
push ecx
push esi
push eax
push 0x408e50
push 0x4000000
call fcn.00422c82
add esp, 0x10
xor edx, edx
mov ecx, eax
call fcn.00450c07
push ebx
push ebx
push ebx
inc ebx
push ebx
push 0x408e6c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
push eax
lea ecx, [ebp - 0x218]
call fcn.00421940
mov esi, dword [ebp - 0x218]
test esi, esi
je 0x41bf41
xor eax, eax
push eax
push eax
push eax
push eax
push 0x408e6c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
push eax
lea ecx, [ebp - 0x220]
call fcn.00421940
cmp dword [ebp - 0x220], edi
je 0x41bf41
xor eax, eax
lea edi, [ebp - 0x248]
stosd dword es:[edi], eax
xor esi, esi
push 6
pop ecx
mov dword [ebp - 0x280], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x268]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x2a0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x2a0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x41c17a
cmp dword [ebp - 0x2a0], 0
mov ecx, dword [ebp - 0x29c]
mov esi, ecx
mov eax, dword [ebp - 0x294]
mov edi, dword [ebp - 0x298]
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x230], eax
je 0x41c0df
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x1bd
push 0
push ecx
push 0x408e98
push 0x4000000
call fcn.00422c82
pop ecx
pop ecx
xor edx, edx
mov ecx, eax
call fcn.00450c07
mov ecx, dword [ebp - 0x29c]
mov eax, ebx
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x264], 3
mov dword [ebp - 0x254], ebx
jmp 0x41c0e5
mov eax, dword [ebp - 0x280]
test ecx, ecx
je 0x41c133
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x1c9
push 0
push ecx
push 0x408eb4
push 0x4000000
call fcn.00422c82
pop ecx
pop ecx
xor edx, edx
mov ecx, eax
call fcn.00450c07
or dword [ebp - 0x268], 2
mov eax, ebx
mov dword [ebp - 0x260], esi
mov dword [ebp - 0x254], ebx
xor esi, esi
test eax, eax
jne 0x41c1cd
test edi, edi
jne 0x41c30c
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x1d5
push esi
push ecx
push 0x408ed4
push 0x4000000
call fcn.00422c82
pop ecx
pop ecx
xor edx, edx
mov ecx, eax
call fcn.00450c07
jmp 0x41c1b7
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x1e1
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x408eec
push 0x4000000
call fcn.00422c82
add esp, 0xc
xor edx, edx
mov ecx, eax
call fcn.00450c07
mov edi, esi
mov dword [ebp - 0x254], ebx
mov dword [ebp - 0x264], 3
mov dword [ebp - 0x268], ebx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x1ee
push esi
push ecx
push 0x408f1c
push 0x4000000
call fcn.00422c82
pop ecx
pop ecx
xor edx, edx
mov ecx, eax
call fcn.00450c07
mov ebx, dword [ebp - 0x22c]
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x268]
push eax
push ebx
push dword [ebp - 0x220]
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
test eax, eax
je 0x41c25e
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x250], eax
mov esi, dword [ebp - 0x218]
lea eax, [ebp - 0x248]
push 0xc
push eax
push 0x26
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x41c2d6
jmp 0x41bf41
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x209
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x408f30
push 0x4000000
call fcn.00422c82
add esp, 0xc
xor edx, edx
mov ecx, eax
call fcn.00450c07
test edi, edi
jne 0x41c312
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x224
push esi
push ecx
push 0x408f7c
push 0x4000000
call fcn.00422c82
pop ecx
pop ecx
xor edx, edx
mov ecx, eax
call fcn.00450c07
mov esi, dword [ebp - 0x218]
push 0
push 0x4000
push 0x41d6f0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
cmp eax, 0xffffffff
jne 0x41c366
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x41bf50
movzx ebx, bx
or ebx, 0x80070000
jmp 0x41bf50
mov ebx, dword [ebp - 0x22c]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x210
push esi
push ecx
push 0x408f64
push 0x4000000
call fcn.00422c82
pop ecx
pop ecx
xor edx, edx
mov ecx, eax
call fcn.00450c07
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x248], 3
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x240], eax
jmp 0x41c23d
mov eax, dword [ebp - 0x26c]
push 0
push dword [ebp - 0x2c4]
push dword [eax]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
push eax
lea ecx, [ebp - 0x224]
call fcn.00421940
cmp dword [ebp - 0x224], 0
je 0x41bf41
mov eax, dword [ebp - 0x27c]
neg eax
sbb eax, eax
and eax, 0x800000
push eax
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x2b0]
push 0x408f98
push dword [ebp - 0x224]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
push eax
lea ecx, [ebp - 0x214]
call fcn.00421940
cmp dword [ebp - 0x214], 0
je 0x41bf41
push 4
lea eax, [ebp - 0x290]
mov dword [ebp - 0x290], 2
push eax
push 0x58
push dword [ebp - 0x214]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x41bf41
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp - 0x214]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x41bf41
mov ecx, dword [0x47cf50]
test ecx, ecx
je 0x41c436
call fcn.0042986c
and dword [0x47cf50], 0
push 0
push dword [ebp - 0x214]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x41bf41
mov eax, dword [0x47cf50]
and dword [0x47cf50], 0
test eax, eax
jne 0x41c47a
and dword [ebp - 0x21c], eax
lea edx, [ebp - 0x21c]
mov ecx, ebx
call fcn.004275e9
mov ebx, eax
test ebx, ebx
jns 0x41c480
jmp 0x41bf50
mov dword [ebp - 0x21c], eax
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x210]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x24c], 0x206
lea eax, [ebp - 0x24c]
push ebx
push eax
lea eax, [ebp - 0x210]
push eax
push ebx
push 0x36
push dword [ebp - 0x214]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x41bf41
mov eax, dword [ebp - 0x24c]
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x41c6ff
xor ecx, ecx
lea edx, [ebp - 0x228]
mov word [ebp + eax - 0x210], cx
lea ecx, [ebp - 0x210]
call fcn.004275e9
mov ebx, eax
test ebx, ebx
js 0x41bf50
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0x22c]
push eax
push dword [ebp + 4]
lea eax, [ebp - 0x210]
push 0x408dd0
push ecx
push 0x261
push 0
push ecx
push eax
push ebx
push 0x408fa4
push 0x4000000
call fcn.00422c82
add esp, 0x10
xor edx, edx
mov ecx, eax
call fcn.00450c07
lea edx, [ebp - 0x234]
mov ecx, ebx
call fcn.0041aafc
mov ebx, eax
test ebx, ebx
jns 0x41c563
mov ecx, ebx
call fcn.004298bc
jmp 0x41c5ff
mov ecx, dword [ebp - 0x234]
xor esi, esi
inc esi
test ecx, ecx
je 0x41c5c9
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
push 0xffffffffffffffff
push ecx
push esi
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
dec eax
dec eax
jne 0x41c5c9
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 4]
push 0x408dd0
push ecx
push 0x268
push 0
push ecx
push dword [ebp - 0x22c]
push 0x408fc0
push 0x4000000
call fcn.00422c82
add esp, 0xc
xor edx, edx
mov ecx, eax
call fcn.00450c07
xor esi, esi
mov eax, dword [ebp - 0x284]
mov ecx, dword [ebp - 0x278]
mov dword [eax], esi
mov eax, dword [ebp - 0x228]
and dword [ebp - 0x228], 0
mov dword [ecx], eax
mov ecx, dword [ebp - 0x288]
test ecx, ecx
je 0x41c5ff
mov eax, dword [ebp - 0x21c]
and dword [ebp - 0x21c], 0
mov dword [ecx], eax
mov esi, dword [ebp - 0x218]
mov ecx, ebx
call fcn.004298d9
mov ecx, dword [ebp - 0x21c]
test ecx, ecx
je 0x41c61b
call fcn.0042986c
mov eax, dword [ebp - 0x250]
test eax, eax
je 0x41c62c
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x41c63d
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x230]
test eax, eax
je 0x41c64e
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test edi, edi
je 0x41c659
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x41c66a
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 0x228]
test ecx, ecx
je 0x41c679
call fcn.0042986c
mov ecx, dword [ebp - 0x234]
test ecx, ecx
je 0x41c688
call fcn.0042986c
cmp dword [ebp - 0x214], 0
je 0x41c69d
push dword [ebp - 0x214]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x224], 0
je 0x41c6b2
push dword [ebp - 0x224]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x220], 0
je 0x41c6c7
push dword [ebp - 0x220]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test esi, esi
je 0x41c6d2
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push 0
lea ecx, [ebp - 0x274]
call fcn.004296bb
lea ecx, [ebp - 0x26c]
call fcn.0041f31d
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00459020
mov esp, ebp
pop ebp
ret 8
call fcn.00459235
int3