Function at 0x49848c
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 0x49871d
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 0x498539
cmp dword [ebp + 0xc], 4
mov eax, dword [ebp + 8]
jl 0x49871d
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 0x498580
mov eax, dword [ebp + 8]
jmp 0x49871d
cmp ebx, 0x7f
jne 0x498522
cmp dword [ebp + 0xc], 0xa
mov eax, dword [ebp + 8]
jl 0x49871d
mov ecx, dword [esp + 0x10]
push dword [ecx + eax + 6]
push dword [ecx + eax + 2]
call fcn.00480bba
mov ebx, eax
pop ecx
pop ecx
test edx, edx
jne 0x498571
cmp ebx, 0x7fffffff
ja 0x498571
add esi, 8
jmp 0x498516
push edi
call fcn.0049912b
mov eax, dword [ebp + 0xc]
pop ecx
jmp 0x49871d
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 0x4985d1
add esi, 4
mov dword [esp + 0x14], esi
test ebx, ebx
jle 0x4985d1
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 0x4985be
dec eax
or eax, 0xfffffffc
inc eax
mov al, byte [eax + esi]
xor byte [ecx + edx], al
inc edx
cmp edx, ebx
jl 0x4985b0
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x34]
test edx, edx
je 0x49871a
mov eax, dword [esp + 0x24]
cmp al, 8
jae 0x498760
cmp dword [edi + 0xd4], 0
jne 0x498608
and dword [esp + 0xc], 0
movzx eax, al
mov dword [edi + 0xc4], eax
mov eax, dword [esp + 0x18]
add eax, 0xa
jmp 0x498633
test al, al
je 0x498615
movzx eax, al
mov dword [edi + 0xc4], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x498651
xor eax, eax
cmp dword [edi + 0xcc], eax
jne 0x498651
cmp byte [edi + 0xd8], al
jne 0x498651
mov dword [esp + 0xc], eax
push eax
push ebx
lea eax, [esp + 0x14]
push eax
lea eax, [esi + ecx]
push eax
push dword [edi + 0xe0]
push 0
push edi
call edx
add esp, 0x1c
jmp 0x49871a
mov eax, dword [edi + 0xcc]
mov esi, dword [edi + 0xd0]
add eax, ebx
cmp eax, esi
jl 0x4986a8
mov ecx, dword [edi + 0xd4]
cmp esi, ecx
jne 0x498724
push 0xa
push dword [edi + 0xcc]
lea eax, [esp + 0x14]
mov byte [edi + 0xd8], 1
push eax
push dword [edi + 0xc8]
xor esi, esi
push dword [edi + 0xe0]
mov dword [esp + 0x20], esi
push esi
push edi
call edx
add esp, 0x1c
mov dword [edi + 0xcc], esi
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov esi, dword [edi + 0xcc]
add eax, ecx
mov edx, dword [edi + 0xd0]
mov ecx, dword [edi + 0xc8]
sub edx, esi
push ebx
push eax
add ecx, esi
call section..text
add dword [edi + 0xcc], ebx
cmp dword [esp + 0x20], 0
pop ecx
pop ecx
je 0x498716
push 0xb
pop eax
xor ecx, ecx
cmp byte [edi + 0xd8], cl
cmove eax, ecx
push eax
push dword [edi + 0xcc]
lea eax, [esp + 0x14]
push eax
push dword [edi + 0xc8]
push dword [edi + 0xe0]
push ecx
push edi
call dword [edi + 0x34]
add esp, 0x1c
mov byte [edi + 0xd8], 0
and dword [edi + 0xcc], 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 0x724fb4
cmovg eax, ecx
push 1
push eax
push dword [edi + 0xc8]
mov dword [edi + 0xd0], eax
call fcn.005e80c0
add esp, 0x14
mov dword [edi + 0xc8], eax
test eax, eax
jne 0x4986a4
jmp 0x4987e6
movzx eax, al
sub eax, 8
je 0x498782
sub eax, 1
jne 0x49871a
push 1
push 1
push 0xa
push eax
xor edx, edx
mov ecx, edi
call fcn.00498d1c
add esp, 0x10
jmp 0x49871a
and dword [esp + 0x24], 0
lea ecx, [edi + 0xb4]
call fcn.0044c7d2
cmp byte [edi + 0xd9], 0
jne 0x4987a7
xor eax, eax
mov byte [edi + 0xd9], 1
inc eax
jmp 0x4987ab
mov eax, dword [esp + 0x24]
mov dword [edi + 0xb4], 0
test eax, eax
je 0x4987da
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.00498d1c
add esp, 0x10
push edi
call fcn.0049912b
pop ecx
jmp 0x49871a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x29d
push esi
push edi
mov edx, 0x724fd4
xor ecx, ecx
call fcn.00488a50
add esp, 0xc
push edi
push 0x724ff4
push 0x725014
call fcn.00401109
add esp, 0xc
push esi
call fcn.005c3000
int3