Function at 0x1001f060
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 0x1002dcbc
mov eax, dword fs:[0]
push eax
mov eax, 0x3cd4
call fcn.1002d240
mov eax, dword [0x1004004c]
xor eax, esp
mov dword [esp + 0x3cd0], eax
push ebx
push ebp
push esi
mov eax, dword [0x1004004c]
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 0x1001f119
mov ecx, dword [edi + 4]
jmp 0x1001f11c
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 0x1001f48b
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 0x1001f15b
mov dword [esp + 0x10], 0xfffffffe
jmp 0x1001f487
cmp dword [ebx + 0xc], 0
je 0x1001f16e
mov dword [esp + 0x10], 0xffffffff
jmp 0x1001f480
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 0x1001f1a9
mov dword [esp + 0x10], 0xfffffffe
jmp 0x1001f471
cmp dword [ebx + 0xc], 0
je 0x1001f1bc
mov dword [esp + 0x10], 0xffffffff
jmp 0x1001f471
cmp dword [edi + 0x38], 0
push 0
push 0
push 0
push 0
push 0
je 0x1001f222
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 0x1001f1f0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1001f1f0
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 0x1001f239
mov dword [esp + 0x10], 0xfffffffd
jmp 0x1001f462
mov ecx, dword [esp + 0x74]
push ecx
push 0x1003503c
push ebp
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esp + 0x14], eax
mov esi, eax
test esi, esi
jne 0x1001f24a
mov dword [esp + 0x10], 0xfffffffd
jmp 0x1001f471
cmp dword [ebx + 0xc], 0
je 0x1001f25d
mov dword [esp + 0x10], 0xffffffff
jmp 0x1001f462
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 0x1001f281
mov dword [esp + 0x10], 0xfffffffd
jmp 0x1001f462
cmp dword [ebx + 0xc], 0
je 0x1001f294
mov dword [esp + 0x10], 0xffffffff
jmp 0x1001f462
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 0x1001f45a
cmp dword [esp + 0x30], 0x190
jae 0x1001f45a
cmp dword [edi + 0x30], 0
je 0x1001f462
cmp dword [edi + 0x54], 0
je 0x1001f34b
cmp dword [edi + 0x18], 8
jb 0x1001f2e7
mov eax, dword [edi + 4]
jmp 0x1001f2ea
lea eax, [edi + 4]
push eax
lea esi, [esp + 0xc8]
call fcn.1001f7a0
lea esi, [edi + 0x1c]
lea ebx, [esp + 0x70]
mov dword [esp + 0x3cec], 0
call fcn.10013d60
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 [0x100321f8]
lea ecx, [esp + 0xc4]
jmp 0x1001f3fe
cmp dword [edi + 0x58], 0
je 0x1001f417
lea esi, [esp + 0xa8]
call fcn.10013e30
mov ebx, 2
push 0x10035044
mov ecx, esi
mov dword [esp + 0x3cf0], ebx
call dword [0x10032260]
cmp dword [edi + 0x18], 8
jb 0x1001f385
mov eax, dword [edi + 4]
jmp 0x1001f388
lea eax, [edi + 4]
push eax
lea esi, [esp + 0x74]
call fcn.1001f7a0
push eax
lea ecx, [esp + 0xac]
mov byte [esp + 0x3cf0], 3
call dword [0x100321f8]
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.10013d60
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 [0x100321f8]
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 0x1001f444
cmp dword [edi + 0x50], eax
je 0x1001f454
mov dword [esp + 0x1c], 0x2800
cmp dword [ebx + 0xc], 0
je 0x1001f4b2
mov dword [esp + 0x10], 0xffffffff
jmp 0x1001f462
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], 0xfffffffc
test esi, esi
je 0x1001f46d
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x1001f47c
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.1002c7c6
add esp, 0x3ce0
ret
cmp dword [edi + 0x34], 8
jb 0x1001f4bd
mov eax, dword [edi + 0x20]
jmp 0x1001f4c0
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 0x1001f4ea
mov dword [esp + 0x10], 0xfffffffb
jmp 0x1001f462
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
test ebx, ebx
ja 0x1001f512
cmp dword [edi + 0x50], 0
je 0x1001f5d2
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x18], ecx
jne 0x1001f5d2
mov edx, dword [esp + 0x20]
cmp dword [edx + 0xc], 0
jne 0x1001f5ba
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 0x1001f5c4
mov esi, dword [esp + 0x18]
test esi, esi
je 0x1001f5ce
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 0x1001f566
xor eax, eax
jmp 0x1001f570
cmp eax, 0x64
jle 0x1001f570
mov eax, 0x64
mov ecx, dword [edi + 0x44]
test ecx, ecx
je 0x1001f58d
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 0x1001f4f6
mov dword [esp + 0x10], 0xfffffff9
jmp 0x1001f5d2
mov dword [esp + 0x10], 0xffffffff
jmp 0x1001f5d2
mov dword [esp + 0x10], 0xfffffffa
jmp 0x1001f5d2
mov esi, dword [esp + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
ja 0x1001f462
mov dword [esp + 0x10], 0
jmp 0x1001f462