Function at 0x10004363
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get common file path
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
sub esp, 0xc0
push ebx
push esi
push edi
push 0xf
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0xbf]
mov byte [ebp - 0xc0], bl
push 0xf
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x5f]
mov byte [ebp - 0x60], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x60]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0xc0]
push eax
push str._s__s
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x10
push ebx
push ebx
push ebx
push ebx
push 0x100113a8
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
cmp edi, ebx
mov dword [ebp + 8], edi
je 0x10004549
push ebx
push 0x400000
mov eax, 0x100115ac
push 3
push eax
push eax
lea eax, [ebp - 0xc0]
push ebx
push eax
push edi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0xc], esi
jne 0x10004405
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x10004549
push ebx
push 0x4000000
push 0x10006020
push ebx
lea eax, [ebp - 0x60]
push str.HTTP_1.1
push eax
push 0x10006134
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
cmp edi, ebx
jne 0x1000443f
push dword [ebp + 8]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
jmp 0x10004549
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x10004536
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 8], 0x10
push eax
push 0x13
push edi
call esi
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
cmp eax, 0x194
pop ecx
je 0x10004536
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x80]
push eax
push 5
push edi
mov dword [ebp - 8], 0x20
call esi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.MSVCRT.dll_atol]
mov esi, eax
lea eax, [esi + 1]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x10], eax
pop ecx
lea ecx, [ebp - 4]
push ecx
push esi
push eax
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [ebp - 4], ebx
je 0x10004536
push 0x200
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov esi, eax
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x40
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameA]
push 0x10006130
push esi
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x60]
push eax
push esi
call sub.MSVCRT.dll_strcat
push 0x10006124
push esi
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x18
cmp esi, ebx
je 0x10004536
push esi
push dword [ebp - 4]
push 1
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fflush]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
push dword [ebp - 0x10]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x1c
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push dword [ebp - 0xc]
call esi
push dword [ebp + 8]
call esi
pop edi
pop esi
pop ebx
leave
ret