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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41cd38
mov eax, dword fs:[0]
push eax
mov eax, 0x1114
call fcn.00407f30
mov eax, dword [0x42c014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10ec], edi
cmp dword [edi + 0x34], 8
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1108], eax
lea eax, [edi + 0x20]
jb 0x4013dd
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
mov dword [ebp - 0x1114], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x401e27
movsd xmm0, qword [edi + 0x58]
mulsd xmm0, qword [0x428c18]
cvttsd2si eax, xmm0
push eax
push eax
push eax
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
je 0x401e27
cmp dword [edi + 0x1c], 8
lea eax, [edi + 8]
xorps xmm0, xmm0
mov dword [ebp - 0x10a4], 0
movlpd qword [ebp - 0x10d4], xmm0
movlpd qword [ebp - 0x10cc], xmm0
movlpd qword [ebp - 0x10c0], xmm0
movlpd qword [ebp - 0x10b8], xmm0
movlpd qword [ebp - 0x10b0], xmm0
mov dword [ebp - 0x10d8], 0x3c
mov dword [ebp - 0x10c4], 1
mov dword [ebp - 0x10a8], 1
mov dword [ebp - 0x10a0], 1
jb 0x40148f
mov eax, dword [eax]
lea ecx, [ebp - 0x10d8]
push ecx
push 0
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x401e27
mov eax, dword [ebp - 0x10cc]
cmp eax, 1
je 0x4014bd
cmp eax, 2
jne 0x401e27
push dword [ebp - 0x10c4]
xor eax, eax
mov dword [ebp - 0x107c], 0
push dword [ebp - 0x10c8]
lea ecx, [ebp - 0x107c]
mov dword [ebp - 0x106c], 0
mov dword [ebp - 0x1068], 7
mov word [ebp - 0x107c], ax
call fcn.00402140
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x102c]
push dword [ebp - 0x10a8]
xor eax, eax
mov dword [ebp - 0x102c], 0
push dword [ebp - 0x10ac]
mov dword [ebp - 0x101c], 0
mov dword [ebp - 0x1018], 7
mov word [ebp - 0x102c], ax
call fcn.00402140
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x104c]
push dword [ebp - 0x10a0]
xor eax, eax
mov dword [ebp - 0x104c], 0
push dword [ebp - 0x10a4]
mov dword [ebp - 0x103c], 0
mov dword [ebp - 0x1038], 7
mov word [ebp - 0x104c], ax
call fcn.00402140
mov byte [ebp - 4], 3
lea edx, [ebp - 0x104c]
cmp dword [ebp - 0x1038], 8
mov edi, dword [ebp - 0x103c]
cmovae edx, dword [ebp - 0x104c]
test edi, edi
je 0x4015b7
mov eax, edi
mov ecx, edx
cmp word [ecx], 0x23
je 0x40169c
add ecx, 2
sub eax, 1
jne 0x4015a5
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x1104], 0
cmp edi, ecx
mov word [ebp - 0x1104], ax
lea eax, [ebp - 0x104c]
mov dword [ebp - 0x10f4], 0
cmovb ecx, edi
mov dword [ebp - 0x10f0], 7
cmp dword [ebp - 0x1038], 8
push ecx
cmovae eax, dword [ebp - 0x104c]
lea ecx, [ebp - 0x1104]
push eax
call fcn.00402140
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1104]
cmp dword [ebp - 0x10f0], 8
mov edi, dword [ebp - 0x101c]
cmovae ecx, dword [ebp - 0x1104]
mov eax, dword [ebp - 0x1018]
mov edx, dword [ebp - 0x10f4]
sub eax, edi
mov dword [ebp - 0x10e4], ecx
mov dword [ebp - 0x10e0], edi
cmp edx, eax
ja 0x4016a5
cmp dword [ebp - 0x1018], 8
lea eax, [edx + edi]
mov dword [ebp - 0x101c], eax
lea edi, [ebp - 0x102c]
cmovae edi, dword [ebp - 0x102c]
mov eax, dword [ebp - 0x10e0]
lea ecx, [edi + eax*2]
lea eax, [edx + edx]
push eax
push dword [ebp - 0x10e4]
push ecx
call fcn.00408690
mov eax, dword [ebp - 0x10f4]
add esp, 0xc
add eax, dword [ebp - 0x10e0]
xor esi, esi
mov word [edi + eax*2], si
lea eax, [ebp - 0x102c]
mov esi, dword [ebp - 0x1114]
jmp 0x4016c0
sub ecx, edx
sar ecx, 1
jmp 0x4015ba
push edx
push ecx
mov byte [ebp - 0x10e4], 0
lea ecx, [ebp - 0x102c]
push dword [ebp - 0x10e4]
push edx
call fcn.004022b0
mov edi, dword [ebp - 0x1104]
lea ecx, [ebp - 0x109c]
push eax
call fcn.00402060
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x10f0]
cmp eax, 8
jb 0x401710
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x401706
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e69
push ecx
push edi
call fcn.004071b0
add esp, 8
cmp dword [ebp - 0x1068], 8
lea eax, [ebp - 0x107c]
push 0
push dword [ebp - 0x10c0]
cmovae eax, dword [ebp - 0x107c]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x1120], eax
mov byte [ebp - 4], 7
test eax, eax
jne 0x401755
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
mov byte [ebp - 0x10d9], al
jmp 0x401cd2
cmp dword [ebp - 0x1018], 8
lea edi, [ebp - 0x102c]
mov edx, dword [ebp - 0x10ec]
cmovae edi, dword [ebp - 0x102c]
add edx, 0x38
cmp dword [edx + 0x14], 8
jb 0x40177a
mov edx, dword [edx]
xor ecx, ecx
mov dword [ebp - 0x10e4], 0x800000
cmp dword [ebp - 0x10cc], 2
cmove ecx, dword [ebp - 0x10e4]
push ecx
push 0
push 0
push 0
push edi
push edx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x1118], edi
mov byte [ebp - 4], 8
test edi, edi
jne 0x4017c7
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
mov byte [ebp - 0x10d9], al
jmp 0x401cca
mov eax, dword [ebp - 0x10ec]
mov esi, dword [eax + 0x50]
mov esi, dword [esi]
mov dword [ebp - 0x10ec], esi
cmp byte [esi + 0xd], 0
jne 0x401b5c
mov edx, dword [esi + 0x20]
lea ecx, [esi + 0x10]
mov eax, 0x7ffffffe
mov dword [ebp - 0x10e4], edx
sub eax, edx
cmp eax, 2
jb 0x401e6e
cmp dword [ecx + 0x14], 8
mov dword [ebp - 0x1110], ecx
jb 0x401812
mov eax, dword [ecx]
mov dword [ebp - 0x1110], eax
lea eax, [edx + 2]
mov dword [ebp - 0x1104], 0
mov edx, 7
mov dword [ebp - 0x10f4], 0
mov dword [ebp - 0x10f0], 0
lea ecx, [ebp - 0x1104]
mov dword [ebp - 0x110c], eax
mov dword [ebp - 0x10e8], ecx
cmp eax, edx
jbe 0x4018f9
mov edx, eax
or edx, 7
cmp edx, 0x7ffffffe
jbe 0x401866
mov edx, 0x7ffffffe
jmp 0x401871
cmp edx, 0xa
mov eax, 0xa
cmovb edx, eax
xor ecx, ecx
mov dword [ebp - 0x10e0], edx
mov eax, edx
add eax, 1
setb cl
neg ecx
or ecx, eax
cmp ecx, 0x7fffffff
ja 0x401e5f
add ecx, ecx
cmp ecx, 0x1000
jb 0x4018c8
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x401e5f
push eax
call fcn.00407180
add esp, 4
test eax, eax
je 0x401e64
mov edx, dword [ebp - 0x10e0]
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x4018e7
test ecx, ecx
je 0x4018e5
push ecx
call fcn.00407180
mov edx, dword [ebp - 0x10e0]
add esp, 4
mov ecx, eax
mov dword [ebp - 0x10e8], eax
jmp 0x4018ed
xor ecx, ecx
mov dword [ebp - 0x10e8], ecx
mov eax, dword [ebp - 0x110c]
mov dword [ebp - 0x1104], ecx
mov dword [ebp - 0x10f4], eax
mov eax, dword [ebp - 0x10e4]
add eax, eax
mov dword [ebp - 0x10f0], edx
push eax
push dword [ebp - 0x1110]
push ecx
call fcn.00408690
mov eax, dword [ebp - 0x10e8]
xor edx, edx
mov ecx, dword [ebp - 0x10e4]
add esp, 0xc
mov dword [eax + ecx*2], 0x20003a
mov word [eax + ecx*2 + 4], dx
lea edx, [esi + 0x28]
mov byte [ebp - 4], 9
cmp dword [edx + 0x14], 8
mov dword [ebp - 0x10e0], edx
jb 0x401952
mov ecx, dword [edx]
mov dword [ebp - 0x10e0], ecx
mov eax, dword [ebp - 0x10f4]
mov edx, dword [edx + 0x10]
mov ecx, dword [ebp - 0x10e0]
mov dword [ebp - 0x10e8], eax
mov eax, dword [ebp - 0x10f0]
sub eax, dword [ebp - 0x10e8]
mov dword [ebp - 0x10e4], edx
cmp edx, eax
ja 0x4019e8
mov ecx, dword [ebp - 0x10e8]
cmp dword [ebp - 0x10f0], 8
lea eax, [edx + ecx]
mov dword [ebp - 0x10f4], eax
lea eax, [ebp - 0x1104]
cmovae eax, dword [ebp - 0x1104]
mov dword [ebp - 0x110c], eax
lea ecx, [eax + ecx*2]
lea eax, [edx + edx]
push eax
push dword [ebp - 0x10e0]
push ecx
call fcn.00408690
mov ecx, dword [ebp - 0x10e4]
add esp, 0xc
mov eax, dword [ebp - 0x110c]
add ecx, dword [ebp - 0x10e8]
xor esi, esi
mov edi, dword [ebp - 0x1118]
mov word [eax + ecx*2], si
lea eax, [ebp - 0x1104]
mov esi, dword [ebp - 0x10ec]
jmp 0x401a03
push edx
push ecx
mov byte [ebp - 0x111c], 0
lea ecx, [ebp - 0x1104]
push dword [ebp - 0x111c]
push edx
call fcn.004022b0
mov dword [ebp - 0x1064], 0
xor ecx, ecx
mov dword [ebp - 0x1054], 0
mov dword [ebp - 0x1050], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x1064], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x1054], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x10f0]
cmp edx, 8
jb 0x401a8f
mov ecx, dword [ebp - 0x1104]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401a85
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e64
push edx
push ecx
call fcn.004071b0
add esp, 8
cmp dword [ebp - 0x1050], 8
lea eax, [ebp - 0x1064]
push 0x20000000
push dword [ebp - 0x1054]
cmovae eax, dword [ebp - 0x1064]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov edx, dword [ebp - 0x1050]
test eax, eax
je 0x401c79
cmp edx, 8
jb 0x401afe
mov ecx, dword [ebp - 0x1064]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401af4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e64
push edx
push ecx
call fcn.004071b0
add esp, 8
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x401b2a
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x401b20
cmp esi, dword [eax + 8]
jne 0x401b20
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x401b10
mov esi, eax
mov dword [ebp - 0x10ec], esi
jmp 0x401b52
mov esi, eax
mov dword [ebp - 0x10ec], esi
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x401b52
nop word [eax + eax]
mov eax, dword [ecx]
mov esi, ecx
mov dword [ebp - 0x10ec], esi
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x401b40
cmp byte [esi + 0xd], 0
je 0x4017e2
push 0
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x401cb3
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x401cb3
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
lea eax, [ebp - 0x1080]
push 0
push eax
lea eax, [ebp - 0x1030]
mov dword [ebp - 0x1030], 0
push eax
push 0
push 0x20000013
push edi
mov dword [ebp - 0x1080], 4
call esi
test eax, eax
je 0x401cb3
mov ecx, dword [ebp - 0x1108]
push dword [ebp - 0x1030]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test eax, eax
jne 0x401cb3
push eax
mov dword [ebp - 0x1034], eax
lea eax, [ebp - 0x1084]
push eax
lea eax, [ebp - 0x1034]
mov dword [ebp - 0x1084], 4
push eax
push 0
push 0x20000005
push edi
call esi
mov ecx, dword [ebp - 0x1108]
push 0
push dword [ebp - 0x1034]
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov dword [ebp - 0x1014], 0
nop dword [eax + eax]
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push edi
call esi
test eax, eax
je 0x401cb3
mov ecx, dword [ebp - 0x1108]
lea edx, [ebp - 0x1010]
push dword [ebp - 0x1014]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
test eax, eax
jne 0x401cb3
cmp dword [ebp - 0x1014], eax
ja 0x401c30
mov byte [ebp - 0x10d9], 1
jmp 0x401cbb
cmp edx, 8
jb 0x401cb3
mov ecx, dword [ebp - 0x1064]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401ca9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e64
push edx
push ecx
call fcn.004071b0
add esp, 8
xor al, al
mov byte [ebp - 0x10d9], al
push edi
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call edi
mov esi, dword [ebp - 0x1114]
push dword [ebp - 0x1120]
call edi
mov edx, dword [ebp - 0x1088]
cmp edx, 8
jb 0x401d12
mov ecx, dword [ebp - 0x109c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401d08
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e69
push edx
push ecx
call fcn.004071b0
add esp, 8
mov edx, dword [ebp - 0x1038]
cmp edx, 8
jb 0x401d52
mov ecx, dword [ebp - 0x104c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401d48
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e69
push edx
push ecx
call fcn.004071b0
add esp, 8
mov edx, dword [ebp - 0x1018]
xor eax, eax
mov dword [ebp - 0x103c], 0
mov dword [ebp - 0x1038], 7
mov word [ebp - 0x104c], ax
cmp edx, 8
jb 0x401daf
mov ecx, dword [ebp - 0x102c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401da5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e69
push edx
push ecx
call fcn.004071b0
add esp, 8
mov edx, dword [ebp - 0x1068]
xor eax, eax
mov dword [ebp - 0x101c], 0
mov dword [ebp - 0x1018], 7
mov word [ebp - 0x102c], ax
cmp edx, 8
jb 0x401e08
mov ecx, dword [ebp - 0x107c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401dfe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e69
push edx
push ecx
call fcn.004071b0
add esp, 8
xor eax, eax
mov dword [ebp - 0x106c], 0
mov dword [ebp - 0x1068], 7
mov word [ebp - 0x107c], ax
jmp 0x401e39
xor al, al
mov byte [ebp - 0x10d9], al
test esi, esi
je 0x401e42
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push esi
call edi
mov al, byte [ebp - 0x10d9]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00407172
mov esp, ebp
pop ebp
ret 4
call fcn.00401180
call fcn.0040b3bf
call fcn.0040b3bf
call fcn.00401250
int3