Function at 0x10020950
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1002f44c
mov eax, dword fs:[0]
push eax
mov eax, 0x3cd4
call fcn.1002ea40
mov eax, dword [0x1004304c]
xor eax, esp
mov dword [esp + 0x3cd0], eax
push ebx
push ebp
push esi
mov eax, dword [0x1004304c]
xor eax, esp
push eax
lea eax, [esp + 0x3ce4]
mov dword fs:[0], eax
push 0x3c
lea eax, [esp + 0x38]
mov ebx, ecx
push 0
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], 0
call sub.MSVCR90.dll_memset
mov eax, 0x800
mov dword [esp + 0x54], eax
mov dword [esp + 0x70], eax
lea eax, [esp + 0x2ec]
lea ecx, [esp + 0x4ec]
mov dword [esp + 0x5c], eax
mov eax, 0x200
mov dword [esp + 0x50], ecx
add esp, 0xc
cmp dword [edi + 0x18], 8
lea edx, [esp + 0xce0]
lea ecx, [esp + 0xe0]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], eax
mov eax, dword [edi + 0x14]
mov dword [esp + 0x34], 0x3c
mov dword [esp + 0x60], edx
mov dword [esp + 0x58], ecx
jb 0x10020a09
mov ecx, dword [edi + 4]
jmp 0x10020a0c
lea ecx, [edi + 4]
lea edx, [esp + 0x34]
push edx
push 0
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x10020d7b
push 0
push 0
push 0
push 0
push str.HTTPDownloader
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x10020a4b
mov dword [esp + 0x10], 0xfffffffe
jmp 0x10020d77
cmp dword [ebx + 0xc], 0
je 0x10020a5e
mov dword [esp + 0x10], 0xffffffff
jmp 0x10020d70
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x50]
push 0
push 0
push 3
push ecx
mov ecx, dword [esp + 0x5c]
push edx
push ecx
lea edx, [esp + 0x4f8]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebp, eax
mov dword [esp + 0x28], ebp
test ebp, ebp
jne 0x10020a99
mov dword [esp + 0x10], 0xfffffffe
jmp 0x10020d61
cmp dword [ebx + 0xc], 0
je 0x10020aac
mov dword [esp + 0x10], 0xffffffff
jmp 0x10020d61
cmp dword [edi + 0x38], 0
push 0
push 0
push 0
push 0
push 0
je 0x10020b12
mov eax, dword [esp + 0x74]
push eax
push str.POST
push ebp
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov eax, str.Content_Type:_application_x_www_form_urlencoded__charsetUTF_8__r_n
mov dword [esp + 0x14], esi
lea edx, [eax + 2]
jmp 0x10020ae0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10020ae0
sub eax, edx
push 0xa0000000
sar eax, 1
push eax
push str.Content_Type:_application_x_www_form_urlencoded__charsetUTF_8__r_n
push esi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
jne 0x10020b29
mov dword [esp + 0x10], 0xfffffffd
jmp 0x10020d52
mov ecx, dword [esp + 0x74]
push ecx
push 0x1003728c
push ebp
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esp + 0x14], eax
mov esi, eax
test esi, esi
jne 0x10020b3a
mov dword [esp + 0x10], 0xfffffffd
jmp 0x10020d61
cmp dword [ebx + 0xc], 0
je 0x10020b4d
mov dword [esp + 0x10], 0xffffffff
jmp 0x10020d52
mov edx, dword [edi + 0x3c]
mov eax, dword [edi + 0x38]
push edx
push eax
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x10020b71
mov dword [esp + 0x10], 0xfffffffd
jmp 0x10020d52
cmp dword [ebx + 0xc], 0
je 0x10020b84
mov dword [esp + 0x10], 0xffffffff
jmp 0x10020d52
mov ebp, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x38]
push edx
push 0x20000013
push esi
mov dword [esp + 0x38], 4
call ebp
test eax, eax
je 0x10020d4a
cmp dword [esp + 0x30], 0x190
jae 0x10020d4a
cmp dword [edi + 0x30], 0
je 0x10020d52
cmp dword [edi + 0x54], 0
je 0x10020c3b
cmp dword [edi + 0x18], 8
jb 0x10020bd7
mov eax, dword [edi + 4]
jmp 0x10020bda
lea eax, [edi + 4]
push eax
lea esi, [esp + 0xc8]
call fcn.10021090
lea esi, [edi + 0x1c]
lea ebx, [esp + 0x70]
mov dword [esp + 0x3cec], 0
call fcn.10014a10
push eax
mov ecx, esi
mov byte [esp + 0x3cf0], 1
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov ecx, ebx
mov byte [esp + 0x3cec], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea eax, [esp + 0xc4]
push eax
mov ecx, esi
call dword [0x10034214]
lea ecx, [esp + 0xc4]
jmp 0x10020cee
cmp dword [edi + 0x58], 0
je 0x10020d07
lea esi, [esp + 0xa8]
call fcn.10014ae0
mov ebx, 2
push 0x10037294
mov ecx, esi
mov dword [esp + 0x3cf0], ebx
call dword [0x1003422c]
cmp dword [edi + 0x18], 8
jb 0x10020c75
mov eax, dword [edi + 4]
jmp 0x10020c78
lea eax, [edi + 4]
push eax
lea esi, [esp + 0x74]
call fcn.10021090
push eax
lea ecx, [esp + 0xac]
mov byte [esp + 0x3cf0], 3
call dword [0x10034214]
mov ecx, esi
mov byte [esp + 0x3cec], bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea esi, [edi + 0x1c]
lea ebx, [esp + 0x8c]
call fcn.10014a10
push eax
mov ecx, esi
mov byte [esp + 0x3cf0], 4
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov ecx, ebx
mov byte [esp + 0x3cec], 2
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0xa8]
push ecx
mov ecx, esi
call dword [0x10034214]
lea ecx, [esp + 0xa8]
mov dword [esp + 0x3cec], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
push 0
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x24]
push eax
push 0x20000005
push esi
mov dword [esp + 0x38], 4
call ebp
test eax, eax
jne 0x10020d34
cmp dword [edi + 0x50], eax
je 0x10020d44
mov dword [esp + 0x1c], 0x2800
cmp dword [ebx + 0xc], 0
je 0x10020da2
mov dword [esp + 0x10], 0xffffffff
jmp 0x10020d52
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], 0xfffffffc
test esi, esi
je 0x10020d5d
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x10020d6c
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x3ce4]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3cd0]
xor ecx, esp
call fcn.1002dfc6
add esp, 0x3ce0
ret
cmp dword [edi + 0x34], 8
jb 0x10020dad
mov eax, dword [edi + 0x20]
jmp 0x10020db0
lea eax, [edi + 0x20]
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x10020dda
mov dword [esp + 0x10], 0xfffffffb
jmp 0x10020d52
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
test ebx, ebx
ja 0x10020e02
cmp dword [edi + 0x50], 0
je 0x10020ec2
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x18], ecx
jne 0x10020ec2
mov edx, dword [esp + 0x20]
cmp dword [edx + 0xc], 0
jne 0x10020eaa
lea eax, [esp + 0x18]
push eax
push 0x2800
lea ecx, [esp + 0x14e8]
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x10020eb4
mov esi, dword [esp + 0x18]
test esi, esi
je 0x10020ebe
mov ecx, dword [esp + 0x1c]
sub ebx, esi
mov eax, ecx
sub eax, ebx
imul eax, eax, 0x64
xor edx, edx
div ecx
test eax, eax
jge 0x10020e56
xor eax, eax
jmp 0x10020e60
cmp eax, 0x64
jle 0x10020e60
mov eax, 0x64
mov ecx, dword [edi + 0x44]
test ecx, ecx
je 0x10020e7d
mov edx, dword [edi + 0x4c]
push eax
mov eax, dword [edi + 0x48]
push 0
push 2
push edx
push eax
call ecx
mov esi, dword [esp + 0x2c]
add esp, 0x14
push 0
lea ecx, [esp + 0x1c]
push ecx
push esi
lea edx, [esp + 0x14ec]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esp + 0x14]
test eax, eax
jne 0x10020de6
mov dword [esp + 0x10], 0xfffffff9
jmp 0x10020ec2
mov dword [esp + 0x10], 0xffffffff
jmp 0x10020ec2
mov dword [esp + 0x10], 0xfffffffa
jmp 0x10020ec2
mov esi, dword [esp + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
ja 0x10020d52
mov dword [esp + 0x10], 0
jmp 0x10020d52