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

Disassembly:
sub esp, 0x1c
push ebp
xor ebp, ebp
push edi
xor edi, edi
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x38], ebp
je 0x401be9
cmp dword [esp + 0x3c], ebp
je 0x401be9
push ebx
push esi
mov esi, dword [esp + 0x34]
cmp esi, ebp
jg 0x401a29
xor esi, esi
push ebp
push ebp
push ebp
push ebp
push str.OneSixLao_Application.
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
mov dword [esp + 0x28], ebx
cmp ebx, ebp
je 0x401a81
mov eax, dword [esp + 0x30]
push ebp
push esi
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [esp + 0x1c], eax
cmp eax, ebp
je 0x401a81
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x48]
neg ecx
sbb ecx, ecx
and ecx, 0x800000
push ecx
mov ecx, dword [esp + 0x20]
push ebp
push ebp
push ebp
push edx
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x1c]
push eax
push 0x1f
push edi
mov dword [esp + 0x34], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
or dword [esp + 0x18], 0x3100
push 4
lea ecx, [esp + 0x1c]
push ecx
push 0x1f
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
cmp edi, ebp
je 0x401ba5
mov ebp, dword [esp + 0x3c]
test ebp, ebp
je 0x401aeb
mov eax, ebp
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401ad0
sub eax, edx
mov edx, eax
mov eax, ebp
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401ae0
sub eax, esi
jmp 0x401aef
xor edx, edx
xor eax, eax
push 0
push edx
push eax
push ebp
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x401ba3
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x401ba3
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
lea edx, [esp + 0x10]
push edx
push edi
mov dword [esp + 0x18], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x401b4c
call ebx
push eax
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.004015d0
add esp, 8
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x40]
inc edx
push edx
lea esi, [eax + ecx]
push 0
push esi
call fcn.004595b0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea eax, [esp + 0x20]
push eax
push ecx
push esi
push edi
call ebp
test eax, eax
jne 0x401b8c
call ebx
push eax
push str.Error__u_in_WinHttpReadData._n
call fcn.004015d0
add esp, 8
jmp 0x401b94
mov edx, dword [esp + 0x20]
add dword [esp + 0x14], edx
cmp dword [esp + 0x10], 0
ja 0x401b24
mov ebx, dword [esp + 0x28]
xor ebp, ebp
jmp 0x401bbe
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d_has_occurred._n
call fcn.004015d0
add esp, 8
call fcn.00401590
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp edi, ebp
je 0x401bcb
push edi
call esi
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x401bd6
push eax
call esi
cmp ebx, ebp
je 0x401bdd
push ebx
call esi
mov eax, dword [esp + 0x14]
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x1c
ret
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x1c
ret