Function at 0x413c60
Capabilities:
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x517ffe
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x587978]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], ecx
xor edi, edi
mov dword [ebp - 0x10], edi
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
cmp dword [eax - 0xc], edi
jne 0x413ccf
mov edx, dword [0x587944]
mov eax, dword [edx + 0xc]
mov ecx, 0x587944
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x14]
call fcn.00406d20
mov dword [ebp - 4], 0xffffffff
mov ebx, 1
lea esi, [ebp - 0x14]
mov dword [ebp - 4], ebx
jmp 0x413cf7
add eax, 0xfffffff0
push eax
call fcn.00406e60
add esp, 4
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 1
lea esi, [ebp - 0x14]
mov dword [ebp - 4], 3
mov ebx, 2
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x10], ebx
mov eax, dword [ecx]
cmp dword [eax - 0xc], edi
jne 0x413d3c
mov edx, dword [0x587944]
mov eax, dword [edx + 0xc]
mov ecx, 0x587944
call eax
add eax, 0x10
mov dword [ebp + 0x14], eax
mov dword [ebp - 4], 4
lea ecx, [ebp + 0x14]
call fcn.00406d20
mov byte [ebp - 4], 3
lea eax, [ebp + 0x14]
mov dword [ebp - 4], 5
or ebx, 4
jmp 0x413d62
add eax, 0xfffffff0
push eax
call fcn.00406e60
add eax, 0x10
add esp, 4
mov dword [ebp + 0x14], eax
mov dword [ebp - 4], 5
lea eax, [ebp + 0x14]
mov dword [ebp - 4], 7
or ebx, 8
mov edi, dword [ebp + 0x1c]
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x10], ebx
mov ecx, dword [esi]
mov eax, dword [eax]
mov edx, dword [edx]
mov esi, dword [ebp + 8]
mov esi, dword [esi]
push edi
push ecx
push eax
push edx
push esi
mov esi, dword [ebp - 0x18]
mov eax, dword [esi + 0x34]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
lea edi, [esi + 0x28]
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 4]
mov dword [ebp + 0x10], edi
test eax, eax
je 0x413daa
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [edi + 4], 0
mov eax, dword [ebp + 0xc]
mov dword [edi + 4], eax
mov eax, 5
mov dword [ebp - 4], eax
test bl, 8
je 0x413de5
and ebx, 0xfffffff7
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413de5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 3
mov dword [ebp - 4], eax
test bl, 4
je 0x413e1a
and ebx, 0xfffffffb
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413e1a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov dword [ebp - 4], eax
test bl, 2
je 0x413e4f
and ebx, 0xfffffffd
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413e4f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or ecx, 0xffffffff
mov dword [ebp - 4], ecx
test bl, 1
je 0x413e7f
and ebx, 0xfffffffe
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x413e7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x413fd7
cmp byte [ebp + 0x2c], 0
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
je 0x413eb0
push 4
lea ecx, [ebp + 0x2c]
push ecx
push 0x1f
push eax
mov dword [ebp + 0x2c], 0x3300
call edi
test eax, eax
je 0x413fd7
xor eax, eax
lea edx, [ebp - 0x24]
push edx
lea ecx, [esi + 0x14]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x3c]
push ecx
push eax
call fcn.0040c510
add esp, 0xc
test al, al
je 0x413fd7
mov eax, dword [esi + 0x2c]
push 0xc
lea edx, [ebp - 0x24]
push edx
push 0x26
push eax
call edi
mov edi, eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x413ef5
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x413f03
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test edi, edi
je 0x413fd7
mov edi, dword [ebp + 0x28]
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x413f52
mov edx, dword [0x587944]
mov eax, dword [edx + 0xc]
mov ecx, 0x587944
call eax
add eax, 0x10
mov dword [ebp + 0x2c], eax
mov dword [ebp - 4], 0xc
lea ecx, [ebp + 0x2c]
call fcn.00406d20
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp + 0x2c]
mov dword [ebp - 4], 0xd
or ebx, 0x10
jmp 0x413f65
push edi
lea ecx, [ebp + 0x14]
call fcn.00407140
mov dword [ebp - 4], 0xe
or ebx, 0x20
mov dword [ebp - 0x10], ebx
mov edx, dword [eax]
mov eax, dword [ebp + 0x24]
mov ecx, dword [edi]
mov ecx, dword [ecx - 0xc]
mov edi, dword [esi + 0x2c]
push esi
push eax
push eax
neg eax
sbb eax, eax
and eax, dword [ebp + 0x20]
push eax
push ecx
push edx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov edi, eax
mov dword [ebp - 4], 0xd
test bl, 0x20
je 0x413fa5
and ebx, 0xffffffdf
lea ecx, [ebp + 0x14]
mov dword [ebp - 0x10], ebx
call fcn.004064c0
mov dword [ebp - 4], 0xffffffff
test bl, 0x10
je 0x413fbf
and ebx, 0xffffffef
lea ecx, [ebp + 0x2c]
mov dword [ebp - 0x10], ebx
call fcn.004064c0
test edi, edi
jne 0x413ff1
mov esi, dword [ebp + 0x10]
mov eax, dword [esi + 4]
test eax, eax
je 0x413fd7
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [esi + 4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov esi, dword [esi + 0x2c]
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x414023
mov ecx, dword [ebp + 0x10]
call fcn.0040b060
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28