Function at 0x42af90
Capabilities:
Initialize winhttp library
Prepare http request
Print debug messages
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c21a8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c0
mov eax, dword [0x4f840c]
xor eax, esp
mov dword [esp + 0x2b8], eax
push ebx
push esi
push edi
mov eax, dword [0x4f840c]
xor eax, esp
push eax
lea eax, [esp + 0x2d0]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
xor edi, edi
push edi
push edi
push edi
push edi
push 0x4e2958
mov dword [esp + 0x40], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
push 0x4e0ba8
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCR100.dll_strlen]
add esp, 4
push eax
push 0x4e0ba8
mov ecx, esi
call fcn.0040dda8
cmp dword [esp + 0x14], edi
je 0x42b834
xor edx, edx
push ebx
mov dword [esp + 0xa4], 7
mov dword [esp + 0xa0], edi
mov word [esp + 0x90], dx
call dword [sym.imp.MSVCR100.dll_wcslen]
add esp, 4
mov ecx, ebx
lea esi, [esp + 0x8c]
call fcn.0040885a
mov dword [esp + 0x2d8], edi
mov eax, 7
xor ecx, ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], edi
mov word [esp + 0x54], cx
xor edx, edx
mov dword [esp + 0x84], eax
mov dword [esp + 0x80], edi
mov word [esp + 0x70], dx
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], edi
mov byte [esp + 0x38], dl
push 1
lea eax, [esp + 0x14]
push eax
mov ecx, esi
mov byte [esp + 0x2e0], 3
push ecx
mov dword [esp + 0x1c], 0x3a
call fcn.0040d92d
cmp eax, 0xffffffff
je 0x42b3e7
push 1
lea edx, [esp + 0x14]
push edx
mov eax, esi
mov ebx, 0x3a
push eax
mov dword [esp + 0x1c], ebx
call fcn.0040d92d
push eax
push edi
mov ecx, esi
push ecx
lea eax, [esp + 0xb4]
call fcn.004089b5
mov esi, eax
lea edx, [esp + 0x54]
cmp edx, esi
je 0x42b154
cmp dword [esp + 0x68], 8
jb 0x42b106
mov eax, dword [esp + 0x54]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [esp + 0x68], 7
mov dword [esp + 0x64], edi
mov word [esp + 0x54], cx
cmp dword [esi + 0x14], 8
jae 0x42b138
mov eax, dword [esi + 0x10]
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x58]
push esi
push eax
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x42b140
mov ecx, dword [esi]
mov dword [esp + 0x54], ecx
mov dword [esi], edi
mov edx, dword [esi + 0x10]
mov dword [esp + 0x64], edx
mov eax, dword [esi + 0x14]
mov dword [esp + 0x68], eax
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov byte [esp + 0x2d8], 3
cmp dword [esp + 0xbc], 8
jb 0x42b177
mov ecx, dword [esp + 0xa8]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
push 1
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x94]
push eax
mov dword [esp + 0x1c], ebx
call fcn.0040d92d
push 0xffffffffffffffff
inc eax
push eax
lea ecx, [esp + 0x94]
push ecx
lea eax, [esp + 0xb4]
call fcn.004089b5
mov esi, eax
lea edx, [esp + 0x70]
cmp edx, esi
je 0x42b226
mov ebx, 8
cmp dword [esp + 0x84], ebx
jb 0x42b1cd
mov eax, dword [esp + 0x70]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [esp + 0x84], 7
mov dword [esp + 0x80], edi
mov word [esp + 0x70], cx
cmp dword [esi + 0x14], ebx
jae 0x42b204
mov eax, dword [esi + 0x10]
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x74]
push esi
push eax
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x42b20c
mov ecx, dword [esi]
mov dword [esp + 0x70], ecx
mov dword [esi], edi
mov edx, dword [esi + 0x10]
mov dword [esp + 0x80], edx
mov eax, dword [esi + 0x14]
mov dword [esp + 0x84], eax
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov esi, 8
mov byte [esp + 0x2d8], 3
cmp dword [esp + 0xbc], esi
jb 0x42b24d
mov ecx, dword [esp + 0xa8]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [esp + 0x70]
cmp dword [esp + 0x84], esi
jae 0x42b25e
lea eax, [esp + 0x70]
push eax
lea esi, [esp + 0xac]
call fcn.0042a4d0
add esp, 4
mov esi, eax
lea edx, [esp + 0x38]
mov ebx, 0x10
cmp edx, esi
je 0x42b2d9
cmp dword [esp + 0x4c], ebx
jb 0x42b291
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], edi
mov byte [esp + 0x38], 0
cmp dword [esi + 0x14], ebx
jae 0x42b2bd
mov eax, dword [esi + 0x10]
inc eax
push eax
lea ecx, [esp + 0x3c]
push esi
push ecx
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x42b2c5
mov edx, dword [esi]
mov dword [esp + 0x38], edx
mov dword [esi], edi
mov eax, dword [esi + 0x10]
mov dword [esp + 0x48], eax
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x4c], ecx
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov byte [esp + 0x2d8], 3
cmp dword [esp + 0xbc], ebx
jb 0x42b2fb
mov edx, dword [esp + 0xa8]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x4c], ebx
jae 0x42b309
lea eax, [esp + 0x38]
cmp dword [esp + 0x68], 8
mov esi, dword [esp + 0x54]
jae 0x42b318
lea esi, [esp + 0x54]
push edi
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
mov edx, dword [esp + 0x1c]
add esp, 4
push eax
push esi
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [esp + 0x24], eax
mov esi, eax
cmp esi, edi
jne 0x42b427
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [esp + 0x4c], ebx
jb 0x42b363
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov esi, 8
mov byte [esp + 0x38], 0
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], 0xf
cmp dword [esp + 0x84], esi
jb 0x42b390
mov edx, dword [esp + 0x70]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov ebx, 7
mov word [esp + 0x70], ax
mov dword [esp + 0x80], edi
mov dword [esp + 0x84], ebx
cmp dword [esp + 0x68], esi
jb 0x42b3be
mov ecx, dword [esp + 0x54]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x64], edi
mov word [esp + 0x54], dx
cmp dword [esp + 0xa0], esi
jb 0x42b834
mov eax, dword [esp + 0x8c]
push eax
jmp 0x42b82b
mov eax, dword [esp + 0x18]
push edi
push str.http
call fcn.00424770
mov ecx, dword [esp + 0x1c]
movzx eax, al
add esp, 4
neg eax
sbb eax, eax
and eax, 0xfffffe95
add eax, 0x1bb
push eax
push ebx
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov esi, eax
mov dword [esp + 0x24], esi
mov ebx, 0x10
jmp 0x42b336
mov eax, dword [esp + 0x18]
push str.http
call fcn.00424770
mov edx, dword [esp + 0x2c]
add esp, 4
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 0xff800000
add ecx, 0x800000
push ecx
push edi
push edi
push edi
push edx
push 0x4e29f4
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp ebx, edi
jne 0x42b484
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
cmp dword [esp + 0x4c], 0x10
jmp 0x42b353
push str.Content_Type:application_x_www_form_urlencoed_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x20000000
push eax
push str.Content_Type:application_x_www_form_urlencoed_r_n
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x42b555
push ebx
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call ebx
push esi
call ebx
mov ecx, dword [esp + 0x14]
push ecx
call ebx
cmp dword [esp + 0x4c], 0x10
jb 0x42b4d1
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov esi, 8
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], edi
mov byte [esp + 0x38], 0
cmp dword [esp + 0x84], esi
jb 0x42b4fe
mov eax, dword [esp + 0x70]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov ebx, 7
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], edi
mov word [esp + 0x70], cx
cmp dword [esp + 0x68], esi
jb 0x42b52c
mov edx, dword [esp + 0x54]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [esp + 0x68], ebx
mov dword [esp + 0x64], edi
mov word [esp + 0x54], ax
cmp dword [esp + 0xa0], esi
jb 0x42b834
mov ecx, dword [esp + 0x8c]
push ecx
jmp 0x42b82b
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x24]
push eax
push 0x1f
push ebx
mov dword [esp + 0x44], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
or dword [esp + 0x20], 0x3100
push 4
lea ecx, [esp + 0x24]
push ecx
push 0x1f
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov edi, eax
test edi, edi
jne 0x42b5f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
push 0x1fe
mov esi, eax
push edx
lea eax, [esp + 0xce]
push eax
mov word [esp + 0xd0], dx
call sub.MSVCR100.dll_memset
push esi
lea ecx, [esp + 0xd4]
push str.Error:_d_n
push ecx
call dword [sym.imp.MSVCR100.dll_wprintf]
add esp, 0x18
lea edx, [esp + 0xc4]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x42b6d8
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [esp + 0x10], eax
test eax, eax
je 0x42b6d4
mov dword [esp + 0x1c], 0
lea ecx, [ecx]
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x42b6d4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x42b6d4
lea edi, [eax + 1]
lea esi, [esp + 0xa8]
call fcn.004221a0
mov byte [esp + 0x2d8], 7
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0xa8]
lea ecx, [esp + 0x30]
push ecx
push edx
push esi
push ebx
mov dword [esp + 0x40], 0
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x42b6c8
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x2c]
push ecx
lea ebx, [esi + eax]
push edx
lea eax, [esp + 0x30]
push eax
mov eax, esi
call fcn.0042c450
xor edi, edi
add esp, 0xc
mov byte [esp + 0x2d8], 3
cmp esi, edi
je 0x42b6a4
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ebx, dword [esp + 0x18]
mov dword [esp + 0xa8], edi
mov dword [esp + 0xac], edi
mov dword [esp + 0xb0], edi
cmp dword [esp + 0x1c], edi
jbe 0x42b6d4
jmp 0x42b610
lea esi, [esp + 0xa8]
call fcn.004221f0
mov edi, dword [esp + 0x10]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call esi
mov ecx, dword [esp + 0x24]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
test edi, edi
je 0x42b799
cmp dword [esp + 0x4c], 0x10
jb 0x42b70c
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edi, edi
mov esi, 8
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], edi
mov byte [esp + 0x38], 0
cmp dword [esp + 0x84], esi
jb 0x42b73b
mov ecx, dword [esp + 0x70]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov ebx, 7
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], edi
mov word [esp + 0x70], dx
cmp dword [esp + 0x68], esi
jb 0x42b769
mov eax, dword [esp + 0x54]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x64], edi
mov word [esp + 0x54], cx
cmp dword [esp + 0xa0], esi
jb 0x42b792
mov edx, dword [esp + 0x8c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov al, 1
jmp 0x42b836
cmp dword [esp + 0x4c], 0x10
jb 0x42b7ae
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edi, edi
mov esi, 8
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], edi
mov byte [esp + 0x38], 0
cmp dword [esp + 0x84], esi
jb 0x42b7dd
mov ecx, dword [esp + 0x70]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov ebx, 7
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], edi
mov word [esp + 0x70], dx
cmp dword [esp + 0x68], esi
jb 0x42b80b
mov eax, dword [esp + 0x54]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x64], edi
mov word [esp + 0x54], cx
cmp dword [esp + 0xa0], esi
jb 0x42b834
mov edx, dword [esp + 0x8c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor al, al
mov ecx, dword [esp + 0x2d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2b8]
xor ecx, esp
call fcn.00485d44
mov esp, ebp
pop ebp
ret