Function at 0x4744c0
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x3c
movzx eax, word [0x5060e8]
cmp eax, 0xffff
je 0x4745a6
test eax, eax
jne 0x474557
push 0x5060e8
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x474545
movzx eax, word [0x5060e8]
cmp eax, 0x202
jne 0x474545
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
je 0x474545
mov esi, eax
movups xmm0, xmmword [0x4f79b0]
movups xmmword [esp + 0xc], xmm0
lea eax, [esp + 4]
lea ecx, [esp + 0xc]
push 0
push 0
push eax
push 4
push 0x505ca8
push 0x10
push ecx
push 0xc8000006
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x474550
mov word [0x5060e8], 0xffff
jmp 0x4745a6
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esp + 0x50]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
movups xmmword [esp + 0x1c], xmm0
movups xmmword [esp + 0x2c], xmm0
mov dword [esp + 0x20], 2
mov dword [esp + 0x24], 1
lea eax, [esp + 4]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x4f7970
push dword [esp + 0x60]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x4745b2
xor ebx, ebx
mov eax, ebx
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 4]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x474601
movups xmm0, xmmword [0x4f7974]
movups xmmword [esp + 0xc], xmm0
lea ecx, [esp + 0xc]
push 0x10
push ecx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x47460d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub esp, 8
mov dword [esp + 4], eax
call fcn.00474a20
add esp, 8
jmp 0x4745a6
push dword [esp + 4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x4745a6
mov edi, dword [esp + 0x58]
push 0x40
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
mov dword [eax], 0x20544547
mov byte [eax + 4], 0
mov ebx, 4
mov ebp, 0x40
test edi, edi
je 0x4746c7
mov dword [esp], esi
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x47469d
mov esi, eax
cmp eax, 0x3b
jbe 0x4746a6
mov ebx, edi
lea eax, [esi + 5]
mov ecx, 0x40
nop word [eax + eax]
mov ebp, ecx
add ecx, ecx
cmp eax, ebp
ja 0x474660
push ebp
push dword [esp + 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov edi, eax
add eax, 4
push esi
push ebx
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov ebx, esi
add ebx, 4
mov byte [edi + esi + 4], 0
mov esi, edi
test ebp, ebp
jne 0x4746c7
mov al, 1
mov edi, dword [esp + 0x54]
jmp 0x4746dc
mov edi, dword [esp + 0x54]
mov esi, dword [esp]
jmp 0x4746cb
mov ecx, edi
mov edi, dword [esp]
mov eax, edi
add eax, 4
push esi
push ecx
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov ebx, esi
add ebx, 4
mov byte [edi + esi + 4], 0
mov esi, edi
mov edi, dword [esp + 0x54]
mov eax, ebx
not eax
add eax, ebp
cmp eax, 0xf
ja 0x47471d
xor eax, eax
test ebp, ebp
jne 0x4746e1
mov ebp, 0x20
lea ecx, [ebx + 0x11]
mov edx, ebp
nop word cs:[eax + eax]
mov ebp, edx
add edx, edx
cmp ecx, ebp
ja 0x4746f0
test al, al
je 0x474721
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test ebx, ebx
je 0x47472d
lea ecx, [ebx + 1]
push ecx
push esi
push eax
mov esi, eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov eax, esi
add esp, 0xc
jmp 0x474732
mov eax, esi
jmp 0x474732
push ebp
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
jmp 0x474732
mov byte [eax], 0
xor ebx, ebx
movups xmm0, xmmword [str._HTTP_1.1_nHost:]
movups xmmword [eax + ebx], xmm0
lea esi, [ebx + 0x10]
mov byte [eax + ebx + 0x10], 0
test edi, edi
je 0x4747db
mov dword [esp], eax
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x4747af
test ebp, ebp
mov dword [esp + 8], eax
je 0x474770
mov ecx, ebp
sub ecx, ebx
add ecx, 0xffffffef
cmp ecx, eax
jae 0x4747b4
cmp ebp, 2
mov edx, 0x20
cmovae edx, ebp
lea ecx, [ebx + eax]
add ecx, 0x11
add ebx, 0x11
nop word cs:[eax + eax]
mov edi, edx
add edx, edx
cmp ecx, edi
ja 0x474790
test ebp, ebp
mov eax, dword [esp]
je 0x47483f
push edi
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
jmp 0x4747b9
mov eax, dword [esp]
jmp 0x4747db
mov eax, dword [esp]
mov edi, ebp
mov ebp, eax
lea eax, [esi + ebp]
mov ebx, dword [esp + 8]
push ebx
push dword [esp + 0x58]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
add esi, ebx
mov byte [ebp + esi], 0
mov eax, ebp
mov ebp, edi
mov ecx, dword [esp + 0x5c]
test ebp, ebp
je 0x4747ee
mov edx, esi
not edx
add edx, ebp
cmp edx, 1
ja 0x474818
mov ebx, ecx
cmp ebp, 2
mov edx, 0x20
cmovae edx, ebp
lea ecx, [esi + 3]
nop
mov edi, edx
add edx, edx
cmp ecx, edi
ja 0x474800
test ebp, ebp
je 0x47481c
push edi
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
jmp 0x474868
mov edi, ebp
jmp 0x47486a
mov ebp, eax
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test esi, esi
je 0x474865
lea ecx, [esi + 1]
push ecx
push ebp
push eax
mov ebp, eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov eax, ebp
add esp, 0xc
jmp 0x474868
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ebp, eax
test esi, esi
je 0x474a0d
push ebx
push dword [esp + 4]
push ebp
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
jmp 0x4747bb
mov byte [eax], 0
mov ecx, ebx
mov word [eax + esi], 0xa0d
lea ebx, [esi + 2]
mov byte [eax + esi + 2], 0
test ecx, ecx
je 0x47490b
mov dword [esp], eax
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x4748df
test edi, edi
mov dword [esp + 8], eax
je 0x4748a3
mov ecx, edi
sub ecx, esi
add ecx, 0xfffffffd
cmp ecx, eax
jae 0x4748e4
cmp edi, 2
mov edx, 0x20
cmovae edx, edi
lea ecx, [esi + eax]
add ecx, 3
add esi, 3
nop word [eax + eax]
mov ebp, edx
add edx, edx
cmp ecx, ebp
ja 0x4748c0
test edi, edi
mov eax, dword [esp]
je 0x4749e3
push ebp
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
jmp 0x4748e9
mov eax, dword [esp]
jmp 0x47490b
mov eax, dword [esp]
mov ebp, edi
mov edi, eax
mov ecx, dword [esp + 0x5c]
lea eax, [edi + ebx]
mov esi, dword [esp + 8]
push esi
push ecx
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
add ebx, esi
mov byte [edi + ebx], 0
mov eax, edi
mov edi, ebp
test edi, edi
je 0x47491f
mov ecx, ebx
not ecx
add ecx, edi
mov ebp, 1
cmp ecx, 1
ja 0x474946
cmp edi, 2
mov edx, 0x20
cmovae edx, edi
lea ecx, [ebx + 3]
nop dword [eax]
mov ebp, edx
add edx, edx
cmp ecx, ebp
ja 0x474930
test edi, edi
je 0x4749b7
push ebp
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov esi, eax
mov edi, dword [esp + 0x50]
mov word [esi + ebx], 0xa0d
mov byte [esi + ebx + 2], 0
add ebx, 2
mov eax, dword [esp + 4]
lea ecx, [edi + 4]
push ecx
push 0
push ebx
push esi
push dword [eax + 0x10]
push dword [eax + 0x18]
push dword [edi]
call dword [0x505ca8]
mov edi, eax
push dword [esp + 4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov bl, 1
test edi, edi
jne 0x4749a1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x4749a1
mov eax, dword [esp + 0x50]
push dword [eax]
call dword [sym.imp.WS2_32.dll_closesocket]
xor ebx, ebx
test ebp, ebp
je 0x4745a8
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x4745a8
mov dword [esp], eax
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
test ebx, ebx
mov edi, dword [esp + 0x50]
je 0x474a05
lea eax, [ebx + 1]
push eax
push dword [esp + 4]
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
jmp 0x47494c
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov edi, eax
test ebx, ebx
je 0x474a16
push esi
push dword [esp + 4]
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
jmp 0x4748eb
mov byte [esi], 0
jmp 0x47494c
mov byte [ebp], 0
jmp 0x4747bb
mov byte [edi], 0
jmp 0x4748eb