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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f1e80
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x54c1b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edi, edx
mov dword [ebp - 0x88], eax
mov eax, dword [edi + 0xc]
xor esi, esi
mov dword [ebp - 0x8c], ecx
cmp eax, esi
je 0x4164b4
push eax
call ebx
mov dword [edi + 0xc], esi
mov eax, dword [edi + 8]
cmp eax, esi
je 0x4164c1
push eax
call ebx
mov dword [edi + 8], esi
mov eax, dword [edi + 4]
cmp eax, esi
je 0x4164ce
push eax
call ebx
mov dword [edi + 4], esi
push esi
push esi
push esi
push esi
push 0x513580
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [edi + 4], eax
cmp eax, esi
jne 0x416507
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5135b8
push 0x5138b8
add edi, 0x20
call fcn.00407fa0
add esp, 0xc
xor al, al
jmp 0x41679e
mov edx, dword [edi + 0x1c]
mov ecx, dword [edi + 0x18]
push edx
mov edx, dword [edi + 0x14]
push ecx
push edx
push esi
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], esi
mov word [ebp - 0x48], cx
mov dword [ebp - 4], esi
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x2c], dx
mov ebx, dword [ebp - 0x88]
mov byte [ebp - 4], 1
mov dword [ebp - 0x6c], eax
xor eax, eax
mov word [ebp - 0x80], ax
mov eax, ebx
mov dword [ebp - 0x70], esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x416556
sub eax, edx
sar eax, 1
push eax
push ebx
lea ecx, [ebp - 0x80]
call fcn.00408810
lea ecx, [ebp - 0x80]
push ecx
lea edx, [ebp - 0x84]
lea ecx, [ebp - 0x2c]
lea ebx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0040ad80
mov ebx, 8
add esp, 4
mov byte [ebp - 4], 1
cmp dword [ebp - 0x6c], ebx
jb 0x4165a5
mov edx, dword [ebp - 0x80]
push edx
call fcn.004bb4d8
add esp, 4
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x34], ebx
jae 0x4165b0
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0x84]
mov edx, dword [edi + 4]
push esi
push ecx
push eax
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [edi + 8], eax
cmp eax, esi
jne 0x41661f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ConnectHttpServer
push 0x5138b8
add edi, 0x20
call fcn.00407fa0
add esp, 0xc
cmp dword [ebp - 0x18], ebx
jb 0x4165f7
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004bb4d8
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x2c], cx
cmp dword [ebp - 0x34], ebx
jb 0x416618
mov edx, dword [ebp - 0x48]
push edx
call fcn.004bb4d8
add esp, 4
xor al, al
jmp 0x41679e
mov edx, dword [ebp - 0x88]
xor eax, eax
mov word [ebp - 0x64], ax
mov eax, edx
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], esi
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x416640
sub eax, ebx
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x64]
call fcn.00408810
push 6
push str.https:
lea ecx, [ebp - 0x64]
push ecx
xor eax, eax
mov byte [ebp - 4], 3
call fcn.00407570
mov ecx, 0x800000
test eax, eax
je 0x41667e
mov ecx, dword [ebp - 0x84]
mov eax, dword [ebp - 0x2c]
mov ebx, 8
cmp dword [ebp - 0x18], ebx
jae 0x41668e
lea eax, [ebp - 0x2c]
mov edx, dword [edi + 8]
push ecx
push esi
push esi
push esi
push eax
push 0x5135dc
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [edi + 0xc], eax
cmp eax, esi
jne 0x416720
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateHttpRequest
push 0x5138b8
add edi, 0x20
call fcn.00407fa0
add esp, 0xc
cmp dword [ebp - 0x50], ebx
jb 0x4166d6
mov eax, dword [ebp - 0x64]
push eax
call fcn.004bb4d8
add esp, 4
xor ecx, ecx
mov edi, 7
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], esi
mov word [ebp - 0x64], cx
cmp dword [ebp - 0x18], ebx
jb 0x4166f8
mov edx, dword [ebp - 0x2c]
push edx
call fcn.004bb4d8
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x2c], ax
cmp dword [ebp - 0x34], ebx
jb 0x416618
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.004bb4d8
add esp, 4
xor al, al
jmp 0x41679e
mov edx, dword [ebp - 0x8c]
push edi
call fcn.00416cc0
test al, al
jne 0x416768
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SendHttpRequest
push 0x5138b8
add edi, 0x20
call fcn.00407fa0
add esp, 0xc
lea ecx, [ebp - 0x64]
call fcn.00407bb0
lea ecx, [ebp - 0x2c]
call fcn.00407bb0
lea ecx, [ebp - 0x48]
call fcn.00407bb0
xor al, al
jmp 0x41679e
mov edx, dword [edi + 0xc]
push esi
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x416784
push 0x51387c
push edi
call fcn.00416d20
jmp 0x41674c
lea ecx, [ebp - 0x64]
call fcn.00407bb0
lea ecx, [ebp - 0x2c]
call fcn.00407bb0
lea ecx, [ebp - 0x48]
call fcn.00407bb0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 4