Function at 0x447520
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1288
call fcn.004c5930
mov eax, dword [0x577760]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1284], eax
mov eax, edi
mov dword [ebp - 0x127c], ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x447554
sub eax, edx
je 0x4476f8
push 0x104
lea edx, [ebp - 0x23c]
push 0
push edx
call fcn.004c5420
add esp, 0xc
push 0x104
lea eax, [ebp - 0x134]
push 0
push eax
call fcn.004c5420
add esp, 0xc
lea ecx, [ebp - 0x1280]
push ecx
lea edx, [ebp - 0x1268]
push edx
mov ecx, edi
call fcn.00446c80
mov esi, 0x10
add esp, 8
cmp dword [eax + 0x14], esi
jb 0x4475b3
mov eax, dword [eax]
lea edx, [ebp - 0x134]
sub edx, eax
jmp 0x4475c0
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4475c0
cmp dword [ebp - 0x1254], esi
jb 0x4475e1
mov eax, dword [ebp - 0x1268]
push eax
call fcn.004bf135
add esp, 4
lea eax, [ebp - 0x134]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4475f0
sub eax, edx
je 0x4476f8
mov ebx, dword [ebp - 0x1280]
xor eax, eax
mov byte [ebp - 0x28], cl
push 0xa
lea ecx, [ebp - 0x28]
movzx edx, bx
push ecx
push edx
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov word [ebp - 0xb], ax
mov byte [ebp - 9], al
call fcn.0050a43d
lea eax, [ebp - 0x134]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x447641
sub eax, edx
mov dword [ebp - 0x126c], eax
cmp bx, 0x50
jne 0x44765a
xor esi, esi
jmp 0x44766c
lea eax, [ebp - 0x28]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x447660
sub eax, edx
lea esi, [eax + 1]
lea eax, [ebp - 0x134]
push eax
push edi
call fcn.004c1040
add esp, 8
lea ecx, [ebp - 0x134]
lea edi, [esi + eax]
add edi, dword [ebp - 0x126c]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x4476f8
mov edx, 2
push ebx
mov word [ebp - 0x124c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x124a], ax
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push 0
push 1
push 2
mov dword [ebp - 0x1248], edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x126c], eax
cmp eax, 0xffffffff
je 0x4476f8
mov esi, dword [ebp - 0x126c]
push 0x10
lea eax, [ebp - 0x124c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x44770b
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004be8b8
mov esp, ebp
pop ebp
ret
push 0x1000
push 0
push 0x594bf0
call fcn.004c5420
mov eax, 0x594bf0
add esp, 0xc
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x447725
mov ecx, dword [str.GET]
mov dl, byte [0x560d80]
mov dword [eax], ecx
mov byte [eax + 4], dl
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x447743
sub eax, edx
je 0x44777b
mov eax, edi
mov ecx, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x447752
mov edi, 0x594bf0
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x447763
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x447792
mov edi, 0x594bf0
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x447781
mov ax, word [0x560d78]
mov word [edi], ax
mov eax, 0x594bf0
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x447798
mov ecx, dword [str._HTTP_1.1_r_n]
mov edx, dword [0x560d88]
mov dword [eax], ecx
mov ecx, dword [0x560d8c]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov eax, 0x594bf0
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4477c0
mov edx, dword [str.Host:]
mov cx, word [0x560d94]
mov dword [eax], edx
mov dl, byte [0x560d96]
mov word [eax + 4], cx
mov byte [eax + 6], dl
lea eax, [ebp - 0x134]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4477f0
mov edi, 0x594bf0
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x447801
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, 0x594bf0
rep movsb byte es:[edi], byte [esi]
dec eax
lea ecx, [ecx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x447820
mov bx, word [0x55c578]
mov cl, byte [0x55c57a]
mov edi, 0x594bf0
mov word [eax], bx
mov byte [eax + 2], cl
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x447841
mov eax, dword [ebp - 0x127c]
mov ecx, 6
mov esi, str.Connection:_keep_alive_r_n
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
test eax, eax
je 0x447889
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x447862
mov edi, 0x594bf0
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x447873
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, 0x594bf0
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x447890
mov dl, byte [0x55c57a]
mov edi, dword [ebp - 0x126c]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
mov word [eax], bx
push 4
mov byte [eax + 2], dl
lea eax, [ebp - 0x1278]
push eax
push 0x1006
push 0xffff
push edi
mov dword [ebp - 0x1278], 0x2710
call esi
push 4
lea ecx, [ebp - 0x1278]
push ecx
push 0x1005
push 0xffff
push edi
call esi
mov eax, 0x594bf0
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4478f0
push 0
sub eax, ecx
push eax
push 0x594bf0
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x447913
push edi
jmp 0x4476f2
push 0xfff
lea edx, [ebp - 0x123b]
push 0
push edx
mov byte [ebp - 0x123c], 0
call fcn.004c5420
mov ebx, dword [sym.imp.WS2_32.dll_recv]
add esp, 0xc
xor esi, esi
jmp 0x447940
mov eax, dword [ebp - 0x126c]
push 0
push 1
lea edi, [ebp + esi - 0x123c]
push edi
push eax
call ebx
cmp eax, 0xffffffff
je 0x447a24
cmp byte [ebp + esi - 0x123f], 0xd
jne 0x447981
cmp byte [ebp + esi - 0x123e], 0xa
jne 0x447981
cmp byte [ebp + esi - 0x123d], 0xd
jne 0x447981
cmp byte [edi], 0xa
je 0x44798a
inc esi
cmp esi, 0x1000
jb 0x447940
lea edx, [ebp - 0x1274]
push edx
lea eax, [ebp - 0x123c]
push str._____d
push eax
call fcn.004bfc12
mov eax, dword [ebp - 0x1274]
lea ecx, [eax - 0xc8]
add esp, 0xc
cmp ecx, 0xc7
ja 0x4476f8
cmp eax, 0x12e
je 0x447b6a
cmp eax, 0x12d
je 0x447b6a
xor esi, esi
lea eax, [ebp - 0x123c]
mov dword [ebp - 0x1270], esi
call fcn.00446c00
cmp eax, esi
je 0x447a30
lea edx, [ebp - 0x1270]
push edx
push 0x560de0
push eax
call fcn.004bfc12
add esp, 0xc
cmp dword [ebp - 0x1270], 0x5f5e100
jbe 0x447a44
mov dword [0x5947d8], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004be8b8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x126c]
push ecx
jmp 0x4476f2
lea eax, [ebp - 0x123c]
push str.Transfer_Encoding:_chunked
push eax
call fcn.004c1040
add esp, 8
lea ecx, [ebp - 0x123c]
push str.Content_Encoding:_gzip
push ecx
call fcn.004c1040
mov edx, dword [ebp - 0x1284]
push 0x560e18
push edx
xor ebx, ebx
xor edi, edi
call fcn.004c1182
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x447a8d
mov dword [0x5947d8], ebx
lea eax, [ebx + 3]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004be8b8
mov esp, ebp
pop ebp
ret
push 0x400
push 0
push 0x5947f0
call fcn.004c5420
mov eax, dword [ebp - 0x126c]
add esp, 0xc
push 0
push 0x400
push 0x5947f0
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x447b00
mov edi, edi
push esi
push 1
push eax
push 0x5947f0
add edi, eax
add ebx, eax
call fcn.004c0ba8
mov eax, dword [ebp - 0x1270]
add esp, 0x10
test eax, eax
je 0x447ae3
cmp edi, eax
jae 0x447b33
mov ecx, dword [ebp - 0x126c]
push 0
push 0x400
push 0x5947f0
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x447ac0
push esi
mov dword [0x5947d8], 0
call fcn.004c0fc7
mov eax, dword [ebp - 0x126c]
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004be8b8
mov esp, ebp
pop ebp
ret
cmp ebx, eax
je 0x447b00
mov edx, dword [ebp - 0x126c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call fcn.004c0fc7
add esp, 4
mov dword [0x5947d8], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004be8b8
mov esp, ebp
pop ebp
ret
mov eax, dword [0x5947d8]
inc eax
mov dword [0x5947d8], eax
cmp eax, 5
jle 0x447b98
mov dword [0x5947d8], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004be8b8
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x23c]
push ecx
lea eax, [ebp - 0x123c]
call fcn.00446c20
mov edx, dword [ebp - 0x127c]
mov eax, dword [ebp - 0x1284]
add esp, 4
push edx
push eax
lea ecx, [ebp - 0x23c]
push ecx
call fcn.00447520
mov ecx, dword [ebp - 8]
add esp, 0xc
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004be8b8
mov esp, ebp
pop ebp
ret