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

Disassembly:
sub esp, 0x1c
or dword [esp + 4], 0xffffffff
mov eax, edx
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov dword [esp + 0x20], eax
xor ecx, ecx
push ecx
push ecx
mov dword [eax], ecx
mov edi, ecx
mov eax, dword [esp + 0x38]
mov ebp, ecx
push ecx
push ecx
push ecx
mov dword [esp + 0x2c], ecx
mov dword [eax], ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x401d39
cmp dword [esi + 0x1c], edi
je 0x401b63
cmp dword [esi + 0x20], edi
je 0x401b63
push ebp
push dword [esi + 0x20]
push dword [esi + 0x1c]
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
movzx eax, word [esi + 0xc]
push 0
push eax
push dword [esi]
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, eax
mov dword [esp + 0x24], edx
test edx, edx
je 0x401d32
mov eax, dword [esi + 0x10]
mov ecx, str.POST
neg eax
sbb eax, eax
xor ebx, ebx
and eax, 0x800000
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x18], ebx
jne 0x401ba2
mov ecx, 0x403160
push eax
push ebx
push ebx
push ebx
push dword [esi + 4]
push ecx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
test ebx, ebx
je 0x401d24
cmp dword [esi + 0x10], edi
je 0x401bd8
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x3300
push eax
push 0x1f
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov eax, dword [esi + 8]
push 0
push dword [esi + 0x18]
neg eax
push dword [esi + 0x18]
sbb eax, eax
push dword [esi + 0x14]
push eax
push dword [esi + 8]
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x401d1d
xor esi, esi
push esi
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x401d1d
push esi
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 4
push eax
lea eax, [esp + 0x1c]
push eax
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push 0x20000013
push ebx
call esi
neg eax
mov dword [esp + 0x10], 4
push 0
sbb eax, eax
and dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x20]
push eax
push 0
push 0x20000005
push ebx
call esi
neg eax
sbb eax, eax
and dword [esp + 0x10], edi
and dword [esp + 0x18], eax
lea eax, [esp + 0x10]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
jmp 0x401cdd
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401ce5
inc eax
add eax, ebp
je 0x401ce3
inc eax
push eax
test edi, edi
je 0x401c98
push edi
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
jmp 0x401ca3
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x401ce5
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x14]
lea eax, [edi + ebp]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x401ce5
cmp dword [esp + 0x10], 0
je 0x401ce5
add ebp, dword [esp + 0x10]
lea eax, [esp + 0x10]
and dword [esp + 0x10], 0
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x401c77
jmp 0x401ce5
xor edi, edi
cmp dword [esp + 0x18], 0
je 0x401d09
cmp dword [esp + 0x18], ebp
je 0x401d09
test edi, edi
je 0x401d02
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
or dword [esp + 0x14], 0xffffffff
jmp 0x401d1d
test edi, edi
je 0x401d11
mov byte [edi + ebp], 0
mov eax, dword [esp + 0x20]
mov dword [eax], edi
mov eax, dword [esp + 0x30]
mov dword [eax], ebp
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [esp + 0x24]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ebx, dword [esp + 0x28]
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret