Function at 0x10015e60
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Inspect section memory permissions
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 ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10036078
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x38b8
call fcn.10033630
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
push eax
lea ecx, [ebp - 0x18]
call fcn.10032dca
mov ecx, dword [ebp - 0x18]
xor ebx, ebx
push 0x100550a0
push ecx
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x100162ae
cmp dword [esi + 0xc], ebx
jne 0x100162ae
lea ecx, [ebp - 0x38]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [ebp + 8]
or ebx, 0xffffffff
mov edi, edx
mov ecx, ebx
xor eax, eax
mov byte [ebp - 4], 0xa
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x10015f41
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], ebx
jmp 0x1001612e
lea eax, [ebp + 0x12]
lea ecx, [ebp - 0x2c]
push eax
push ecx
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x74]
push eax
push ecx
push edx
call sub.MFC42.DLL_AfxParseURL
test eax, eax
je 0x10015f02
push 0
push 0x1005509c
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CString::Find_1
mov edi, eax
cmp edi, ebx
je 0x10015fbd
lea eax, [ebp + 8]
push edi
push eax
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xb
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::CString
inc edi
lea ecx, [ebp + 8]
push edi
push ecx
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CString::Mid_1
push eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0xc
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::CString
push str.Content_Type:_text_
lea ecx, [ebp - 0x40]
call fcn.10032dca
lea edx, [ebp - 0x1c]
mov ecx, esi
push edx
mov byte [ebp - 4], 0xd
call sym.EoRezoTools_3.dll_public:_class_CString___thiscall_CNetwork::GetUserAgent_void_
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push 1
push eax
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xe
call sub.MFC42.DLL_CInternetSession::CInternetSession
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x38]
push 0
push 0
push 0
push eax
lea ecx, [ebp - 0x6c]
call sub.MFC42.DLL_CInternetSession::GetHttpConnection
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x28], ebx
je 0x10016229
mov ecx, dword [ebp - 0x34]
push 0x20000000
push 0
push 0
push 1
push 0
push ecx
push 0
mov ecx, ebx
call sub.MFC42.DLL_CHttpConnection::OpenRequest
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
je 0x10016215
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 0x11
mov ecx, dword [eax - 8]
push ecx
push eax
push edx
mov ecx, edi
call sub.MFC42.DLL_CHttpFile::SendRequest
test eax, eax
mov dword [ebp - 4], 0x10
je 0x10016201
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CString::CString_2
xor eax, eax
mov ecx, edi
mov dword [ebp + 8], eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 0x13
push eax
call sub.MFC42.DLL_CHttpFile::QueryInfoStatusCode
cmp dword [ebp - 0x44], 0xc8
jne 0x100160c1
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x1001614e
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
mov dword [ebp + 8], eax
jne 0x1001614e
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx + 4]
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 4]
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xd
call fcn.10033280
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString
mov eax, 0xffeffffe
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov eax, dword [edi]
lea ecx, [ebp - 0x24c8]
push 0x1000
push ecx
mov ecx, edi
call dword [eax + 0x3c]
mov ebx, eax
test ebx, ebx
jle 0x100161dd
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x10016193
mov eax, dword [ebp + 8]
test eax, eax
je 0x10016193
lea edx, [ebp - 0x4c]
push 0
push edx
lea ecx, [ebp - 0x24c8]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x100161aa
lea edx, [ebp - 0x24c8]
lea ecx, [esi + 0x10]
push edx
mov byte [ebp + ebx - 0x24c8], 0
call fcn.10032ddc
mov edx, dword [esi + 8]
mov eax, dword [ebp - 0x3c]
xor ecx, ecx
add eax, ebx
add edx, ecx
push eax
mov dword [esi + 8], edx
mov edx, dword [esi]
mov ecx, esi
mov dword [ebp - 0x3c], eax
call dword [edx + 8]
mov eax, dword [edi]
lea ecx, [ebp - 0x24c8]
push 0x1000
push ecx
mov ecx, edi
call dword [eax + 0x3c]
mov ebx, eax
test ebx, ebx
jg 0x1001616e
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov eax, dword [ebp + 8]
test eax, eax
je 0x100161f2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CString::CString
mov ebx, dword [ebp - 0x28]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x54]
test edi, edi
je 0x10016215
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx + 4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
test ebx, ebx
je 0x10016229
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx + 4]
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xd
call fcn.10033280
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
jmp 0x100166df
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x58], str.text_
mov dword [ebp - 0x54], ebx
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::operator_2
mov edx, dword [ebp - 0x14]
cmp dword [edx - 8], ebx
jne 0x10016314
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
jmp 0x10016122
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0xb0]
rep stosd dword es:[edi], eax
mov eax, 0x400
lea ecx, [ebp - 0x4c0]
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xa0], ecx
push eax
push ebx
lea ecx, [ebp - 0x38c8]
push ebx
push edx
mov dword [ebp - 0xb0], 0x3c
mov dword [ebp - 0x84], ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
mov edi, dword [ebp - 0x98]
lea ecx, [ebp + 8]
push ecx
mov ecx, esi
and edi, 0xffff
call sym.EoRezoTools_3.dll_public:_class_CString___thiscall_CNetwork::GetUserAgent_void_
mov eax, dword [eax]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
lea ecx, [ebp + 8]
mov dword [ebp - 0x44], ebx
call sub.MFC42.DLL_CString::CString
test ebx, ebx
je 0x100162f0
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [ebp + 0x10]
mov byte [ebp - 4], 4
test eax, eax
jne 0x100163b6
push 0x100550a0
jmp 0x100163b7
push eax
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CString::operator_2
mov edx, dword [ebp - 0x24]
push str.HEADER
push edx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
push 0
jne 0x10016442
mov eax, dword [ebp - 0x14]
push SysReAllocString
push 0
push 0
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
je 0x10016436
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea ecx, [ebp + 0xc]
push 0
lea edx, [ebp + 8]
push ecx
push edx
push 0x20000013
push esi
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 4
call edi
lea eax, [ebp + 0xc]
push 0
push eax
push 0
push 0x16
push esi
call edi
lea ecx, [ebp + 0xc]
push 0
lea edx, [ebp - 0x34c8]
push ecx
push edx
push 0x16
push esi
call edi
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x100165d1
push 0
push 3
push 0x1005a050
push 0x1005a050
lea eax, [ebp - 0x4c0]
push edi
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebx, eax
test ebx, ebx
mov dword [ebp + 0x10], ebx
jne 0x10016485
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x20]
push str.InternetConnect_failed:__lu
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x100165d1
lea ecx, [ebp - 0x28]
call sub.MFC42.DLL_CString::CString_2
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x28]
push edx
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::operator_1
push 8
push 0x10055054
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
je 0x100164d7
push eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Mid_1
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp + 8]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
push 0
lea ecx, [ebp - 0x58]
push 0x4403100
push ecx
push 0
push 0
push edx
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
test edi, edi
jne 0x1001651f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x20]
push str.HttpOpenRequest_failed:__lu
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x100165c5
push str.Content_Type:_text__r_n
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::operator_2
mov eax, dword [ebp - 0x1c]
push 0
push 0
mov ecx, dword [eax - 8]
push ecx
push eax
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x10016569
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x20]
push str.HttpSendRequest_failed:__lu
push edx
call sub.MFC42.DLL_CString::Format
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0xc
push edi
call esi
push ebx
call esi
jmp 0x100165c5
xor ebx, ebx
lea eax, [ebp - 0x50]
push ebx
lea ecx, [ebp - 0xc0]
push eax
push ecx
push 5
push edi
mov dword [ebp - 0x50], 0x10
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp eax, ebx
je 0x1001659e
lea edx, [ebp - 0xc0]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [esi + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], ebx
cmp eax, ebx
je 0x100165e2
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x100165e2
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
jmp 0x100162f0
mov eax, dword [esi]
mov ecx, esi
mov dword [ebp - 0x3c], ebx
call dword [eax + 4]
lea ecx, [ebp - 0x3c]
lea edx, [ebp - 0x14c4]
push ecx
push 0x1000
push edx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1001667e
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x1001667e
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x10016633
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x10016633
lea edx, [ebp - 0x70]
push 0
push edx
push eax
lea eax, [ebp - 0x14c4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1001664e
test eax, eax
jbe 0x1001663f
mov byte [ebp + eax - 0x14c4], 0
lea ecx, [ebp - 0x14c4]
push ecx
lea ecx, [esi + 0x10]
call fcn.10032ddc
mov eax, dword [ebp - 0x3c]
mov ecx, dword [esi + 8]
mov edx, dword [esi]
add ecx, eax
add ebx, eax
mov dword [esi + 8], ecx
push ebx
mov ecx, esi
call dword [edx + 8]
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x14c4]
push eax
push 0x1000
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x10016607
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov eax, dword [ebp + 8]
test eax, eax
je 0x10016693
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
mov eax, dword [ebp + 0x10]
push eax
call esi
mov ecx, dword [ebp - 0x44]
push ecx
call esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc