Function at 0x495a25
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
and dword [esp + 0x10], 0
push ebx
push esi
mov esi, edx
mov dword [esp + 0x14], ecx
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x20], esi
lea eax, [esi + 2]
mov dword [esp + 0x10], eax
test edi, edi
je 0x495d97
mov ecx, dword [edi + 0x3c4]
call fcn.0048b143
mov ebx, eax
mov dword [esp + 0x30], ebx
test ebx, ebx
je 0x495d90
cmp dword [ebx + 0x54], 0
je 0x495d90
cmp dword [ebp + 8], 2
jge 0x495a82
mov eax, esi
jmp 0x495d9a
mov eax, dword [ebx]
mov ecx, dword [esp + 0x18]
mov esi, dword [eax]
mov eax, dword [esp + 0x20]
movzx eax, word [ecx + eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
movzx eax, cx
shr eax, 0xf
mov dword [esp + 0x24], eax
mov eax, ecx
movzx edx, cl
mov dword [esp + 0x2c], ecx
mov ecx, edx
shr eax, 8
and ecx, 0x7f
and eax, 0xffffff0f
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], ecx
cmp ecx, 0x7e
jne 0x495b03
cmp dword [ebp + 8], 4
mov eax, dword [esp + 0x20]
jl 0x495d9a
mov ecx, dword [esp + 0x18]
movzx eax, word [ecx + eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
add eax, 2
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
jmp 0x495b50
cmp ecx, 0x7f
jne 0x495b4c
cmp dword [ebp + 8], 0xa
mov eax, dword [esp + 0x20]
jl 0x495d9a
mov ecx, dword [esp + 0x18]
push dword [ecx + eax + 6]
push dword [ecx + eax + 2]
call fcn.00486fb8
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x14], ecx
test edx, edx
jne 0x495d90
cmp ecx, 0x7fffffff
ja 0x495d90
mov eax, dword [esp + 0x10]
add eax, 8
jmp 0x495af9
mov eax, dword [esp + 0x10]
shr edx, 5
and edx, 4
add edx, ecx
add edx, eax
cmp dword [ebp + 8], edx
jge 0x495b68
mov eax, dword [esp + 0x20]
jmp 0x495d9a
mov edx, dword [esp + 0x18]
test byte [esp + 0x2c], 0x80
mov dword [esp + 0x2c], 0
lea edi, [eax + edx]
cmove edi, dword [esp + 0x2c]
mov dword [esp + 0x28], edi
test edi, edi
mov edi, dword [ebp + 0xc]
je 0x495bd8
and dword [esp + 0x2c], 0
add eax, 4
mov dword [esp + 0x10], eax
test ecx, ecx
jle 0x495bd8
mov edi, dword [esp + 0x14]
add eax, edx
mov ecx, dword [esp + 0x2c]
mov ebx, eax
mov edx, dword [esp + 0x28]
mov dword [esp + 0x20], eax
mov eax, ecx
and eax, reloc.WS2_32.dll_closesocket
jns 0x495bbe
dec eax
or eax, 0xfffffffc
inc eax
mov al, byte [eax + edx]
xor byte [ebx + ecx], al
inc ecx
cmp ecx, edi
jl 0x495bb0
mov edi, dword [ebp + 0xc]
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
cmp al, 8
jae 0x495d34
cmp dword [esi + 0x18], 0
jne 0x495bfe
movzx eax, al
mov dword [esi + 8], eax
mov eax, dword [esp + 0x24]
and dword [esp + 0x1c], 0
add eax, 0xa
jmp 0x495c20
test al, al
je 0x495c08
movzx eax, al
mov dword [esi + 8], eax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x495c4b
xor eax, eax
cmp dword [esi + 0x10], eax
jne 0x495c4b
cmp byte [esi + 0x1c], al
jne 0x495c4b
mov dword [esp + 0x1c], eax
push dword [ebp + 0x10]
push dword [ebx + 0x38]
push dword [ebx + 0x34]
push eax
push ecx
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x28]
add eax, edx
push eax
push dword [edi + 0x3a0]
push 0
push edi
call dword [ebx + 0x54]
add esp, 0x28
jmp 0x495d86
mov eax, dword [esi + 0x10]
add eax, ecx
cmp eax, dword [esi + 0x14]
jl 0x495c9b
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jne 0x495d03
push dword [ebp + 0x10]
mov byte [esi + 0x1c], 1
lea eax, [esp + 0x20]
and dword [esp + 0x20], 0
push dword [ebx + 0x38]
push dword [ebx + 0x34]
push 0xa
push dword [esi + 0x10]
push eax
push dword [esi + 0xc]
push dword [edi + 0x3a0]
push 0
push edi
call dword [ebx + 0x54]
add esp, 0x28
and dword [esi + 0x10], 0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push ecx
mov ecx, dword [esi + 0xc]
add eax, edx
mov edx, dword [esi + 0x14]
sub edx, dword [esi + 0x10]
add ecx, dword [esi + 0x10]
push eax
call section..text
mov eax, dword [esp + 0x1c]
add dword [esi + 0x10], eax
cmp dword [esp + 0x2c], 0
pop ecx
pop ecx
je 0x495d86
push dword [ebp + 0x10]
xor ecx, ecx
push dword [ebx + 0x38]
cmp byte [esi + 0x1c], cl
push dword [ebx + 0x34]
push 0xb
pop eax
cmove eax, ecx
push eax
push dword [esi + 0x10]
lea eax, [esp + 0x30]
push eax
push dword [esi + 0xc]
push dword [edi + 0x3a0]
push ecx
push edi
call dword [ebx + 0x54]
add esp, 0x28
mov byte [esi + 0x1c], 0
and dword [esi + 0x10], 0
jmp 0x495d86
add eax, eax
cmp eax, dword [esi + 0x18]
push 0x59c
cmovg eax, dword [esi + 0x18]
push 0x75c0b0
push 1
push eax
push dword [esi + 0xc]
mov dword [esi + 0x14], eax
call fcn.005f5d50
add esp, 0x14
mov dword [esi + 0xc], eax
test eax, eax
jne 0x495c93
jmp 0x495da1
movzx eax, al
sub eax, 8
je 0x495d7f
sub eax, 1
je 0x495d57
sub eax, 1
jne 0x495d86
mov eax, dword [esi + 0x28]
test eax, eax
je 0x495d86
push dword [esi + 0x2c]
push edi
call eax
pop ecx
pop ecx
jmp 0x495d86
mov eax, dword [esi + 0x24]
test eax, eax
je 0x495d6a
push dword [esi + 0x2c]
push edi
call eax
pop ecx
pop ecx
test eax, eax
jne 0x495d86
push ecx
push ecx
push 0
push 0
push 0xa
pop edx
mov ecx, edi
call fcn.004957ee
add esp, 0x10
jmp 0x495d86
mov ecx, edi
call fcn.00497677
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
jmp 0x495d9a
mov ecx, edi
call fcn.00497677
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x59c
push esi
push edi
mov edx, 0x75c0d0
xor ecx, ecx
call fcn.0048f95e
add esp, 0xc
push edi
push 0x75c0f0
push 0x75c110
call fcn.00401109
add esp, 0xc
push esi
call fcn.005d0820
int3