Function at 0x4015d8
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xf0], rcx
mov qword [rbp + 0xf8], rdx
mov qword [rbp + 0x100], r8
mov qword [rbp + 0x108], r9
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
lea rcx, str.User_Agent
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0xd0], rax
cmp qword [rbp + 0xd0], 0
jne 0x401654
lea rcx, str.Failed_to_open_Internet_connection.
call sym.puts
mov eax, 0
jmp 0x4019d4
mov rax, qword [rbp + 0xd0]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x84000100
mov r9d, 0
mov r8d, 0
mov rdx, qword [rbp + 0xf0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0xc8], rax
cmp qword [rbp + 0xc8], 0
jne 0x4016d0
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Failed_to_open_config_file___u_._n
call sym.printf
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x4019d4
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x30], 0
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], 0
mov qword [rbp - 8], 0
mov qword [rbp], 0
mov qword [rbp + 8], 0
mov qword [rbp + 0x10], 0
mov qword [rbp + 0x18], 0
mov qword [rbp + 0x20], 0
mov qword [rbp + 0x28], 0
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x38], 0
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x60], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x70], 0
mov qword [rbp + 0x78], 0
mov qword [rbp + 0x80], 0
mov qword [rbp + 0x88], 0
mov qword [rbp + 0x90], 0
mov qword [rbp + 0x98], 0
mov qword [rbp + 0xa0], 0
mov qword [rbp + 0xa8], 0
mov qword [rbp + 0xb0], 0
mov qword [rbp + 0xb8], 0
mov dword [rbp - 0x44], 0
lea rcx, [rbp - 0x44]
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0xc8]
mov r9, rcx
mov r8d, 0x100
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
jne 0x40185e
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Failed_to_read_config_file___u_._n
call sym.printf
mov rax, qword [rbp + 0xc8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x4019d4
lea rax, [rbp - 0x40]
lea rdx, [0x0040508a]
mov rcx, rax
call sym.strtok
mov qword [rbp + 0xd8], rax
jmp 0x40199b
mov rax, qword [rbp + 0xd8]
mov edx, 0x3d
mov rcx, rax
call sym.strchr
mov qword [rbp + 0xc0], rax
cmp qword [rbp + 0xc0], 0
je 0x401983
mov rax, qword [rbp + 0xc0]
mov byte [rax], 0
mov rax, qword [rbp + 0xd8]
lea rdx, str.IpAddress
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__stricmp]
call rax
test eax, eax
jne 0x4018f9
mov rax, qword [rbp + 0xc0]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0xf8]
mov r8, rdx
mov edx, 0x100
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll_strcpy_s]
call rax
jmp 0x401983
mov rax, qword [rbp + 0xd8]
lea rdx, str.Port
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__stricmp]
call rax
test eax, eax
jne 0x40193f
mov rax, qword [rbp + 0xc0]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x100]
mov r8, rdx
mov edx, 0x100
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll_strcpy_s]
call rax
jmp 0x401983
mov rax, qword [rbp + 0xd8]
lea rdx, str.FileName
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__stricmp]
call rax
test eax, eax
jne 0x401983
mov rax, qword [rbp + 0xc0]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x108]
mov r8, rdx
mov edx, 0x100
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll_strcpy_s]
call rax
lea rdx, [0x0040508a]
mov ecx, 0
call sym.strtok
mov qword [rbp + 0xd8], rax
cmp qword [rbp + 0xd8], 0
jne 0x40187d
mov rax, qword [rbp + 0xc8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 1
add rsp, 0x160
pop rbp
ret