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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44315e
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x500
mov eax, dword [0x45500c]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x465], dl
mov esi, ecx
mov dword [ebp - 0x47c], esi
mov dword [ebp - 0x484], esi
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x480], esi
mov dword [ebp - 0x478], eax
mov dword [ebp - 0x46c], 0
mov dword [ebp - 4], 1
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
push 0
push 0
push 0
push 0
push 0
mov dword [ebp - 0x46c], 1
mov byte [ebp - 4], 3
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov dword [ebp - 0x484], ecx
test ecx, ecx
je 0x423524
cmp dword [ebx + 0x24], 8
lea eax, [ebx + 0x10]
push 0
push dword [ebx + 8]
cmovae eax, dword [ebx + 0x10]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x488], ecx
test ecx, ecx
je 0x423545
cmp byte [ebp - 0x465], 0
lea eax, [ebx + 0x28]
je 0x42307a
cmp dword [ebx + 0x3c], 8
push 0x800000
cmovae eax, dword [ebx + 0x28]
push 0
push 0
push 0
push eax
push str.POST
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x470], edi
jmp 0x42309f
cmp dword [ebx + 0x3c], 8
push 0
cmovae eax, dword [ebx + 0x28]
push 0
push 0
push 0
push eax
push str.POST
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x470], eax
test edi, edi
je 0x423566
push 0x20000000
push 0x1e
push str.Content_Type:_application_json
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x423587
mov ecx, dword [ebp - 0x478]
lea eax, [ebp - 0x1e]
mov ecx, dword [ecx + 0x10]
nop
sub eax, 2
mov dword [ebp - 0x474], eax
mov eax, 0xcccccccd
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
mov eax, dword [ebp - 0x474]
add ecx, 0x30
mov word [eax], cx
mov ecx, edx
test ecx, ecx
jne 0x4230d0
push ecx
lea ecx, [ebp - 0x1e]
push ecx
push eax
lea ecx, [ebp - 0x4b8]
call fcn.0040ce30
mov dword [ebp - 0x46c], 0x19
push 0x10
push str.Content_Length:
push ecx
lea ecx, [ebp - 0x4b8]
mov byte [ebp - 4], 4
call fcn.0040c110
mov dword [ebp - 0x490], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x4a0], xmm0
mov dword [ebp - 0x48c], 0
xor ecx, ecx
movups xmm0, xmmword [eax]
mov dword [ebp - 0x46c], 0x1b
movups xmmword [ebp - 0x4a0], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x490], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
push 2
push 0x4484e8
lea ecx, [ebp - 0x4a0]
mov byte [ebp - 4], 5
call fcn.00409ab0
mov dword [ebp - 0x454], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x464], xmm0
mov dword [ebp - 0x450], 0
xor ecx, ecx
movups xmm0, xmmword [eax]
mov dword [ebp - 0x46c], 0x1f
movups xmmword [ebp - 0x464], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x454], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x48c]
cmp ecx, 8
jb 0x423228
mov edx, dword [ebp - 0x4a0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x42321e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x42327b
push ecx
push edx
call fcn.0043f923
add esp, 8
xor eax, eax
mov dword [ebp - 0x490], 0
mov dword [ebp - 0x48c], 7
mov word [ebp - 0x4a0], ax
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x4a4]
cmp ecx, 8
jb 0x42328b
mov edx, dword [ebp - 0x4b8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x423281
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x423281
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0043f923
add esp, 8
xor eax, eax
mov dword [ebp - 0x4a8], 0
cmp dword [ebp - 0x450], 8
push 0x20000000
push dword [ebp - 0x454]
mov word [ebp - 0x4b8], ax
lea eax, [ebp - 0x464]
cmovae eax, dword [ebp - 0x464]
push eax
push edi
mov dword [ebp - 0x4a4], 7
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x4235a8
mov eax, dword [ebp - 0x478]
cmp dword [eax + 0x14], 0x10
mov ecx, dword [eax + 0x10]
jb 0x4232e8
mov eax, dword [eax]
push 0
push ecx
push ecx
push eax
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x4235c9
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4235ea
mov dword [ebp - 0x44c], 0
nop dword [eax + eax]
lea eax, [ebp - 0x44c]
push eax
push 0x400
lea eax, [ebp - 0x448]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4233b9
mov edi, dword [ebp - 0x44c]
test edi, edi
je 0x4233b3
mov edx, dword [esi + 0x14]
mov eax, edx
mov ecx, dword [esi + 0x10]
sub eax, ecx
cmp edi, eax
ja 0x42338b
lea eax, [edi + ecx]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0x10
jb 0x423365
mov eax, dword [esi]
lea esi, [eax + ecx]
push edi
lea eax, [ebp - 0x448]
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + edi], 0
add esp, 0xc
mov esi, dword [ebp - 0x47c]
mov edi, dword [ebp - 0x470]
jmp 0x423320
push edi
lea eax, [ebp - 0x448]
mov byte [ebp - 0x474], 0
push eax
push dword [ebp - 0x474]
mov ecx, esi
push edi
call fcn.0040bb30
mov edi, dword [ebp - 0x470]
jmp 0x423320
mov edi, dword [ebp - 0x470]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call esi
push dword [ebp - 0x488]
call esi
push dword [ebp - 0x484]
call esi
mov ecx, dword [ebp - 0x450]
cmp ecx, 8
jb 0x423414
mov edx, dword [ebp - 0x464]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x42340a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x42340a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0043f923
add esp, 8
mov esi, dword [ebp - 0x47c]
jmp 0x42347e
mov ecx, dword [ebx + 0x24]
cmp ecx, 8
jb 0x4234b4
mov edx, dword [ebx + 0x10]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4234aa
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4234f4
push ecx
push edx
call fcn.0043f923
add esp, 8
mov ecx, dword [ebx + 0x3c]
xor eax, eax
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 7
mov word [ebx + 0x10], ax
cmp ecx, 8
jb 0x423504
mov edx, dword [ebx + 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4234fa
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4234fa
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0043f923
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0043f497
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push str.Failed_to_initialize_WinHTTP.
lea ecx, [ebp - 0x4c8]
call fcn.00402c40
push 0x451608
lea eax, [ebp - 0x4c8]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_connect_to_host.
lea ecx, [ebp - 0x4d4]
call fcn.00402c40
push 0x451608
lea eax, [ebp - 0x4d4]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_open_HTTP_request.
lea ecx, [ebp - 0x4e0]
call fcn.00402c40
push 0x451608
lea eax, [ebp - 0x4e0]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_set_request_headers.
lea ecx, [ebp - 0x4ec]
call fcn.00402c40
push 0x451608
lea eax, [ebp - 0x4ec]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_set_Content_Length_header.
lea ecx, [ebp - 0x4f8]
call fcn.00402c40
push 0x451608
lea eax, [ebp - 0x4f8]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_send_HTTP_request.
lea ecx, [ebp - 0x504]
call fcn.00402c40
push 0x451608
lea eax, [ebp - 0x504]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_receive_HTTP_response.
lea ecx, [ebp - 0x510]
call fcn.00402c40
push 0x451608
lea eax, [ebp - 0x510]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3