Function at 0x407e10
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
push ebx
push esi
push edi
push 0xff
lea eax, [ebp - 0x223]
xor bl, bl
push 0
push eax
xor edi, edi
mov byte [ebp - 5], bl
mov byte [ebp - 0x224], bl
call sub.msvcrt.dll_memset
push 0x104
lea ecx, [ebp - 0x123]
push 0
push ecx
mov word [ebp - 0xc], di
mov byte [ebp - 0x124], bl
call sub.msvcrt.dll_memset
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov word [ebp - 0xe], ax
mov eax, dword [esi + 0x18]
mov edx, 2
push eax
lea eax, [edi + 1]
lea ecx, [ebp - 5]
mov word [ebp - 0x1c], dx
call fcn.004044f0
add esp, 0x1c
test eax, eax
jne 0x407eab
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x407e9d
mov edi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x57
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x18]
movzx eax, byte [ebp - 5]
push ecx
lea ecx, [ebp - 0x224]
call fcn.004044f0
add esp, 4
test eax, eax
je 0x407e8a
mov cl, byte [ebp - 5]
xor al, al
test cl, cl
je 0x407ee4
mov edi, edi
movzx edx, al
mov bl, byte [ebp + edx - 0x224]
test bl, bl
je 0x407ee4
inc al
cmp al, cl
jb 0x407ed0
cmp al, cl
jne 0x407eeb
or bl, 0xff
mov ecx, dword [esi + 0x18]
push 0
push 2
lea eax, [ebp - 0xc]
push eax
push ecx
mov byte [ebp - 0xc], 5
mov byte [ebp - 0xb], bl
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 2
jne 0x408103
test bl, bl
jne 0x407e9d
mov edx, dword [esi + 0x18]
push edx
mov eax, 4
lea ecx, [ebp - 0x124]
call fcn.004044f0
add esp, 4
test eax, eax
je 0x407e8a
cmp byte [ebp - 0x124], 5
mov ebx, 4
jne 0x407f7d
cmp byte [ebp - 0x123], 1
jne 0x407f7d
mov al, byte [ebp - 0x121]
cmp al, 1
je 0x407f87
cmp al, 3
jne 0x407f7d
mov eax, dword [esi + 0x18]
push eax
lea eax, [ebx - 3]
lea ecx, [ebp - 0x120]
call fcn.004044f0
add esp, 4
test eax, eax
je 0x407fa2
mov al, byte [ebp - 0x120]
mov ebx, 5
test al, al
jne 0x407fd1
mov edi, 0x57
jmp 0x4080e4
mov eax, dword [esi + 0x18]
push eax
mov eax, 6
lea ecx, [ebp - 0x120]
call fcn.004044f0
add esp, 4
test eax, eax
jne 0x407fb3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x407f7d
mov edi, eax
jmp 0x4080d9
mov ecx, dword [ebp - 0x120]
mov dx, word [ebp - 0x11c]
mov ebx, 0xa
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x1a], dx
jmp 0x40807c
mov ecx, dword [esi + 0x18]
movzx eax, al
push ecx
lea ecx, [ebp - 0x11f]
call fcn.004044f0
add esp, 4
test eax, eax
je 0x407fa2
movzx eax, byte [ebp - 0x120]
lea edx, [ebp - 0x11f]
push edx
lea ebx, [eax + 5]
mov byte [ebp + eax - 0x11f], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
movzx ecx, byte [ebp - 0x120]
mov esi, eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x18]
lea ecx, [ebp + ecx - 0x11f]
push edx
mov eax, 2
call fcn.004044f0
add esp, 4
test eax, eax
je 0x408047
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4080d0
lea edi, [eax + 0x57]
jmp 0x4080d2
add ebx, 2
test esi, esi
je 0x4080c3
cmp word [esi + 8], 2
jne 0x4080c3
cmp word [esi + 0xa], 4
jne 0x4080c3
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
movzx eax, byte [ebp - 0x120]
mov edx, dword [ecx]
mov cx, word [ebp + eax - 0x11f]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x18], edx
mov word [ebp - 0x1a], cx
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
add esi, 0x1c
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x4080ca
push 0x10
lea edx, [ebp - 0x1c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x4080d2
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov esi, eax
cmp esi, 0xffffffff
je 0x4080c3
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, 0x4d0
jmp 0x4080d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test ebx, ebx
je 0x408108
mov esi, dword [ebp + 8]
mov byte [ebp - 0x123], 0
test edi, edi
je 0x4080eb
mov byte [ebp - 0x123], 3
mov ecx, dword [esi + 0x18]
push 0
push ebx
lea eax, [ebp - 0x124]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, ebx
je 0x408108
mov edi, 0x4d4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret