Function at 0x10001bc0
Capabilities:
Check http status code
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3838
call main
cmp dword [ebp + 0x14], 0x3e8
push ebx
push esi
push edi
jg 0x10001fd8
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
jl 0x10001fd8
mov esi, 0x1ff
xor eax, eax
mov ecx, esi
lea edi, [ebp - 0x836]
mov word [ebp - 0x838], bx
push dword [ebp + 0x20]
rep stosd dword es:[edi], eax
or dword [ebp - 0x10], 0xffffffff
stosw word es:[edi], ax
lea eax, [ebp - 0x838]
push eax
call fcn.1000251e
pop ecx
xor eax, eax
pop ecx
lea edi, [ebp - 0x1837]
mov ecx, 0x3ff
mov byte [ebp - 0x1838], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x20]
mov edi, dword [ebp + 0xc]
cmp edi, 0x1e9ce6a
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xe04]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
jne 0x10001c60
lea eax, [ebp - 4]
push 4
push eax
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.1000264d
add esp, 0x10
mov eax, dword [ebp - 4]
cmp dword [ebp + 0x10], ebx
mov dword [ebp - 0x1830], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x1838], eax
mov dword [ebp - 0x1834], 0x10050017
mov dword [ebp - 0x182c], edi
je 0x10001c9a
push edi
lea eax, [ebp - 0x1828]
push dword [ebp + 0x10]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add edi, 0x10
xor eax, eax
mov dword [ebp + 0x14], edi
lea edi, [ebp - 0x14]
mov dword [ebp - 0x18], ebx
stosd dword es:[edi], eax
lea eax, [ebp - 0x838]
push eax
call fcn.100023f1
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.10002428
push dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1838]
push eax
lea eax, [ebp - 0x18]
push 8
push eax
call fcn.1000264d
add esp, 0x1c
mov edi, 0x10200
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
push ebx
push eax
mov dword [ebp - 8], eax
call sub.MSVCRT.dll_memset
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x3836]
mov word [ebp - 0x3838], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0xc
xor edi, edi
cmp dword [ebp + 0x14], ebx
jle 0x10001d4b
movzx eax, byte [ebp + edi - 0x1838]
push eax
lea eax, [ebp - 0x3838]
push eax
lea eax, [ebp - 0x3838]
push str._s_02X
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0x10
inc edi
cmp edi, dword [ebp + 0x14]
jl 0x10001d20
lea eax, [ebp - 0x3838]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 0xfffffff6
push eax
push 0xa
call fcn.10001aea
mov edx, eax
mov ecx, esi
xor eax, eax
lea edi, [ebp - 0x2836]
mov word [ebp - 0x2838], bx
mov word [ebp - 0x2038], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, esi
xor eax, eax
lea edi, [ebp - 0x2036]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edi, [edx + edx]
lea eax, [ebp - 0x3838]
push edi
push eax
lea eax, [ebp - 0x2838]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x14
lea eax, [ebp + edi - 0x3838]
push eax
lea eax, [ebp - 0x2038]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x1a
push ebx
call fcn.10001aea
mov edi, eax
push 0x1a
push ebx
add edi, 0x61
call fcn.10001aea
add eax, 0x61
add esp, 0x10
movzx eax, ax
lea ecx, [ebp - 0x2038]
push ecx
push eax
lea eax, [ebp - 0x2838]
push eax
movzx eax, di
push eax
lea eax, [ebp - 0x838]
push eax
lea eax, [ebp - 0x838]
push str._s_c_s_c_s
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
xor eax, eax
lea edi, [ebp - 0x1e]
mov word [ebp - 0x28], 0x47
mov word [ebp - 0x26], 0x45
mov word [ebp - 0x24], 0x54
mov word [ebp - 0x22], bx
mov word [ebp - 0x20], bx
add esp, 0x1c
stosd dword es:[edi], eax
push 0x100
push ebx
stosw word es:[edi], ax
push ebx
lea eax, [ebp - 0x838]
push ebx
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
cmp esi, ebx
mov dword [ebp + 0x10], esi
je 0x10001fd8
mov edi, dword [ebp + 0x20]
cmp dword [edi + 0xc84], 0xfacdeadc
jne 0x10001e88
mov eax, dword [edi + 0xcf0]
cmp eax, ebx
jbe 0x10001e88
lea ecx, [edi + 0xcc8]
push ebx
push ecx
lea ecx, [edi + 0xc88]
push ecx
push eax
push 1
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x10001f72
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x10001f72
cmp dword [ebp + 0x18], ebx
mov esi, dword [ebp - 8]
jne 0x10001eb8
mov dword [ebp + 0x18], esi
mov edi, 0x8000
push edi
push ebx
push esi
mov dword [ebp + 0x14], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp + 0x14]
push ebx
push eax
push esi
push ebx
push 0x13
push dword [ebp + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x10001f6f
mov eax, dword [ebp + 0x14]
push esi
mov byte [eax + esi], bl
call dword [sym.imp.MSVCRT.dll__wtoi]
cmp eax, 0xc8
pop ecx
jne 0x10001f6f
push edi
push ebx
push esi
mov dword [ebp + 0x14], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp + 0x14]
push ebx
push eax
push esi
push ebx
push 5
push dword [ebp + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x10001f6f
mov eax, dword [ebp + 0x14]
push esi
mov byte [eax + esi], bl
call dword [sym.imp.MSVCRT.dll__wtoi]
mov esi, eax
pop ecx
cmp esi, ebx
jbe 0x10001f6f
cmp esi, edi
ja 0x10001f6f
mov eax, dword [ebp + 0x1c]
mov dword [ebp + 0xc], ebx
xor edi, edi
mov dword [eax], esi
lea eax, [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x18]
add eax, edi
push esi
push eax
push dword [ebp + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x10001f66
cmp dword [ebp + 0xc], ebx
jbe 0x10001f68
add edi, dword [ebp + 0xc]
cmp edi, esi
je 0x10001f6c
jmp 0x10001f40
xor edi, edi
cmp edi, esi
jne 0x10001f6f
mov dword [ebp - 0x10], ebx
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
mov edx, dword [edi + 0x1c]
mov esi, dword [eax + 4]
mov ecx, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], edx
jbe 0x10001fb9
xor eax, eax
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp + 0x18]
push esi
shl ecx, 5
shr edx, 7
imul ecx, edx
add eax, 8
add ecx, esi
push eax
lea eax, [ebp - 0x38]
push 0x10
push eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], ecx
call fcn.1000264d
add esp, 0x10
push dword [ebp + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x10]
jmp 0x10001fdb
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret