Function at 0x405a4e
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x5498f8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x330], eax
mov eax, dword [ebp + 0x20]
push ebx
push edi
mov dword [ebp - 0x334], eax
xor eax, eax
lea edi, [ebp - 0x21e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x100
stosw word es:[edi], ax
xor ebx, ebx
lea eax, [ebp - 0x323]
push ebx
push eax
mov byte [ebp - 0x324], 0
call fcn.004f8f00
xor eax, eax
mov byte [ebp - 0x204], al
mov byte [ebp - 0x328], bl
lea edi, [ebp - 0x327]
stosb byte es:[edi], al
lea edi, [ebp - 0x203]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
xor eax, eax
mov byte [ebp - 0x210], bl
lea edi, [ebp - 0x20f]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
push 2
stosb byte es:[edi], al
pop eax
mov word [ebp - 0x220], ax
mov ax, word [ebp + 0x18]
mov word [ebp - 0x21e], ax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x21c], eax
push 0x10
lea eax, [ebp - 0x220]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x405b0c
push 5
pop eax
jmp 0x405ca4
push 4
lea eax, [ebp - 0x324]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x324], 0x2000205
call fcn.004055d7
add esp, 0xc
test eax, eax
je 0x405b04
push esi
push 2
push dword [ebp + 8]
lea esi, [ebp - 0x328]
call fcn.0040561c
pop ecx
pop ecx
test eax, eax
je 0x405c90
cmp byte [ebp - 0x328], 5
je 0x405b5a
xor eax, eax
inc eax
jmp 0x405ca3
cmp byte [ebp - 0x327], 2
je 0x405b6a
push 4
jmp 0x405c92
push 0x1f3
xor esi, esi
lea eax, [ebp - 0x1f7]
push esi
push eax
call fcn.004f8f00
xor eax, eax
lea edi, [ebp - 0x32b]
add esp, 0xc
mov byte [ebp - 0x32c], bl
stosb byte es:[edi], al
mov byte [ebp - 0x1f8], 1
mov edi, 0xff
cmp dword [ebp - 0x330], esi
je 0x405bd2
mov ebx, dword [ebp - 0x330]
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x405bad
push dword [ebp - 0x330]
lea eax, [ebp - 0x1f6]
sub ebx, ecx
push edi
push eax
mov byte [ebp - 0x1f7], bl
call fcn.004f8475
add esp, 0xc
add ebx, 2
cmp dword [ebp - 0x334], esi
je 0x405c16
mov eax, dword [ebp - 0x334]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405be6
push dword [ebp - 0x334]
sub eax, esi
lea esi, [ebp + ebx - 0x1f8]
mov byte [esi], al
lea eax, [ebp + ebx - 0x1f7]
push edi
push eax
call fcn.004f8475
movsx eax, byte [esi]
add esp, 0xc
lea ebx, [ebx + eax + 1]
mov edi, dword [ebp + 8]
push ebx
lea eax, [ebp - 0x1f8]
push eax
push edi
call fcn.004055d7
add esp, 0xc
test eax, eax
je 0x405c90
push 2
push edi
lea esi, [ebp - 0x32c]
call fcn.0040561c
pop ecx
pop ecx
test eax, eax
je 0x405c90
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x200], eax
mov ax, word [ebp + 0x10]
mov word [ebp - 0x1fc], ax
push 0xa
lea eax, [ebp - 0x204]
push eax
push edi
mov word [ebp - 0x204], 0x105
mov byte [ebp - 0x201], 1
call fcn.004055d7
add esp, 0xc
test eax, eax
je 0x405c90
push 0xa
push edi
lea esi, [ebp - 0x210]
call fcn.0040561c
pop ecx
pop ecx
test eax, eax
jne 0x405c95
push 5
pop eax
jmp 0x405ca3
movsx eax, byte [ebp - 0x20f]
neg eax
sbb eax, eax
and eax, 3
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004f7824
leave
ret