Function at 0x480490
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [ebp + 8]
and dword [esp], 0
push ebx
push esi
push edi
push 2
mov edi, ecx
mov dword [esp + 0x14], edx
pop ecx
lea esi, [eax + 2]
mov dword [esp + 0x14], esi
cmp dword [ebp + 0xc], ecx
jl 0x480721
movzx eax, word [edx + eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
movzx eax, cx
shr eax, 0xf
mov dword [esp + 0x18], eax
mov eax, ecx
shr eax, 8
and eax, 0xffffff0f
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
movzx eax, cl
mov ebx, eax
mov dword [esp + 0x1c], eax
and ebx, 0x7f
cmp ebx, 0x7e
jne 0x48053d
cmp dword [ebp + 0xc], 4
mov eax, dword [ebp + 8]
jl 0x480721
mov ecx, dword [esp + 0x10]
movzx eax, word [ecx + eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebx, ax
add esi, 2
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], esi
shr eax, 5
and eax, 4
add eax, ebx
add eax, esi
cmp dword [ebp + 0xc], eax
jge 0x480584
mov eax, dword [ebp + 8]
jmp 0x480721
cmp ebx, 0x7f
jne 0x480526
cmp dword [ebp + 0xc], 0xa
mov eax, dword [ebp + 8]
jl 0x480721
mov ecx, dword [esp + 0x10]
push dword [ecx + eax + 6]
push dword [ecx + eax + 2]
call fcn.0046baaf
mov ebx, eax
pop ecx
pop ecx
test edx, edx
jne 0x480575
cmp ebx, 0x7fffffff
ja 0x480575
add esi, 8
jmp 0x48051a
push edi
call fcn.004811ad
mov eax, dword [ebp + 0xc]
pop ecx
jmp 0x480721
test cl, 0x80
mov ecx, dword [esp + 0x10]
push 0
pop edx
lea eax, [esi + ecx]
cmove eax, edx
mov dword [esp + 0x20], eax
test eax, eax
je 0x4805d5
add esi, 4
mov dword [esp + 0x14], esi
test ebx, ebx
jle 0x4805d5
lea eax, [esi + ecx]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
mov ecx, eax
mov eax, edx
and eax, reloc.WS2_32.dll_closesocket
jns 0x4805c2
dec eax
or eax, 0xfffffffc
inc eax
mov al, byte [eax + esi]
xor byte [ecx + edx], al
inc edx
cmp edx, ebx
jl 0x4805b4
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x30]
test edx, edx
je 0x48071e
mov eax, dword [esp + 0x24]
cmp al, 8
jae 0x480764
cmp dword [edi + 0xd0], 0
jne 0x48060c
and dword [esp + 0xc], 0
movzx eax, al
mov dword [edi + 0xc0], eax
mov eax, dword [esp + 0x18]
add eax, 0xa
jmp 0x480637
test al, al
je 0x480619
movzx eax, al
mov dword [edi + 0xc0], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x480655
xor eax, eax
cmp dword [edi + 0xc8], eax
jne 0x480655
cmp byte [edi + 0xd4], al
jne 0x480655
mov dword [esp + 0xc], eax
push eax
push ebx
lea eax, [esp + 0x14]
push eax
lea eax, [esi + ecx]
push eax
push dword [edi + 0xdc]
push 0
push edi
call edx
add esp, 0x1c
jmp 0x48071e
mov eax, dword [edi + 0xc8]
mov esi, dword [edi + 0xcc]
add eax, ebx
cmp eax, esi
jl 0x4806ac
mov ecx, dword [edi + 0xd0]
cmp esi, ecx
jne 0x480728
push 0xa
push dword [edi + 0xc8]
lea eax, [esp + 0x14]
mov byte [edi + 0xd4], 1
push eax
push dword [edi + 0xc4]
xor esi, esi
push dword [edi + 0xdc]
mov dword [esp + 0x20], esi
push esi
push edi
call edx
add esp, 0x1c
mov dword [edi + 0xc8], esi
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov esi, dword [edi + 0xc8]
add eax, ecx
mov edx, dword [edi + 0xcc]
mov ecx, dword [edi + 0xc4]
sub edx, esi
push ebx
push eax
add ecx, esi
call section..text
add dword [edi + 0xc8], ebx
cmp dword [esp + 0x20], 0
pop ecx
pop ecx
je 0x48071a
push 0xb
pop eax
xor ecx, ecx
cmp byte [edi + 0xd4], cl
cmove eax, ecx
push eax
push dword [edi + 0xc8]
lea eax, [esp + 0x14]
push eax
push dword [edi + 0xc4]
push dword [edi + 0xdc]
push ecx
push edi
call dword [edi + 0x30]
add esp, 0x1c
mov byte [edi + 0xd4], 0
and dword [edi + 0xc8], 0
mov esi, dword [esp + 0x14]
lea eax, [ebx + esi]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x29d
lea eax, [esi + esi]
cmp eax, ecx
push 0x76508c
cmovg eax, ecx
push 1
push eax
push dword [edi + 0xc4]
mov dword [edi + 0xcc], eax
call fcn.005ce1d0
add esp, 0x14
mov dword [edi + 0xc4], eax
test eax, eax
jne 0x4806a8
jmp 0x4807f5
movzx eax, al
sub eax, 8
je 0x480786
sub eax, 1
jne 0x48071e
push 1
push 1
push 0xa
push eax
xor edx, edx
mov ecx, edi
call fcn.00480d75
add esp, 0x10
jmp 0x48071e
and dword [esp + 0x20], 0
push 0xffffffffffffffff
push dword [edi + 0xb0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [edi + 0xd5], 0
jne 0x4807b1
mov byte [edi + 0xd5], 1
mov dword [esp + 0x20], 1
push 0
push 1
push dword [edi + 0xb0]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
cmp dword [esp + 0x20], 0
je 0x4807e9
mov edx, dword [esp + 0x10]
xor eax, eax
push 1
push 2
pop ecx
push ecx
test ebx, ebx
lea edx, [esi + edx]
push 8
cmovg eax, ecx
mov ecx, edi
push eax
call fcn.00480d75
add esp, 0x10
push edi
call fcn.004811ad
pop ecx
jmp 0x48071e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x29d
push esi
push edi
mov edx, 0x7650ac
xor ecx, ecx
call fcn.0047145c
add esp, 0xc
push edi
push 0x7650cc
push 0x7650ec
call fcn.004010b4
add esp, 0xc
push esi
call fcn.005aae60
int3