Function at 0x407410
Capabilities:
Terminate thread

Disassembly:
mov al, byte [esp + 4]
sub esp, 0x49c
test al, al
push ebx
push esi
push edi
jne 0x407740
mov eax, dword [0x41b504]
mov edi, 3
cmp eax, 2
jne 0x407486
cmp dword [0x412020], edi
jne 0x407471
mov eax, dword [0x41bcc0]
xor esi, esi
cmp eax, esi
mov dword [0x41bc50], esi
mov dword [0x412020], 4
mov dword [0x41bc48], edi
je 0x40746c
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [0x41bcc0], esi
call fcn.00406920
call fcn.004073d0
mov dword [0x41b624], edi
pop edi
pop esi
pop ebx
add esp, 0x49c
ret
mov eax, dword [0x412020]
mov ebx, 1
cmp eax, 0x64
jl 0x407544
push edi
push ebx
push str.WZCSVC
call fcn.00401450
mov eax, dword [0x41bc38]
add esp, 0xc
test eax, 0x400000
je 0x4074c0
mov eax, dword [0x41bc58]
and al, 0xfd
mov dword [0x41bc58], eax
xor esi, esi
push esi
push esi
push edi
mov dword [0x41bcb8], esi
mov dword [0x412020], esi
mov dword [0x41bd00], esi
call fcn.00408070
mov al, byte [0x41bc58]
add esp, 0xc
test bl, al
jne 0x40753d
mov eax, dword [0x41240c]
mov cx, word [0x412410]
push 0x888e
mov dword [0x416fd8], eax
mov word [0x416fdc], cx
call sub.WSOCK32.dll_htons
mov word [0x416fe4], ax
call fcn.004073d0
cmp dword [0x4174fc], esi
je 0x407522
call fcn.00406920
mov eax, dword [0x41bc48]
mov dword [0x41b624], edi
inc eax
pop edi
pop esi
mov dword [0x41bc48], eax
pop ebx
add esp, 0x49c
ret
mov eax, dword [0x412020]
jmp 0x407546
xor esi, esi
cmp eax, esi
jne 0x407683
mov ecx, 0x104
xor eax, eax
lea edi, [esp + 0x14]
mov edx, dword [0x416fde]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ax, word [0x416fe2]
push 0x888e
mov dword [esp + 0x1e], edx
mov word [esp + 0x22], ax
call sub.WSOCK32.dll_htons
push 0x888e
mov word [0x416fe4], ax
call sub.WSOCK32.dll_htons
mov ecx, dword [0x41240c]
mov word [esp + 0x20], ax
test byte [0x41bc58], bl
mov ax, word [0x412410]
jne 0x4075b1
mov dword [esp + 0x14], ecx
mov word [esp + 0x18], ax
jmp 0x4075bd
or edx, 0xffffffff
mov dword [esp + 0x14], edx
mov word [esp + 0x18], dx
cmp dword [0x41bd00], esi
jne 0x4075d6
mov dword [esp + 0x14], ecx
mov word [esp + 0x18], ax
mov dword [0x41bd00], ebx
jmp 0x4075e8
or eax, 0xffffffff
mov dword [0x41bd00], esi
mov dword [esp + 0x14], eax
mov word [esp + 0x18], ax
mov byte [esp + 0xc], 0
mov byte [esp + 0xd], 0
mov byte [esp + 0xe], 0x2f
mov byte [esp + 0xf], 0xfc
mov ecx, dword [esp + 0xc]
push esi
mov dword [esp + 0x2a], ecx
mov ecx, dword [0x41bcc4]
lea eax, [esp + 0x18]
mov byte [esp + 0x14], 2
mov byte [esp + 0x15], 6
mov dx, word [esp + 0x14]
push 0x12
push eax
push ecx
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], bl
mov word [esp + 0x34], si
mov word [esp + 0x3a], dx
mov dword [0x41bd04], esi
call fcn.00407330
mov eax, dword [0x41bcc4]
push esi
lea edx, [esp + 0x28]
push 0x12
push edx
push eax
mov dword [0x41bd04], ebx
call fcn.00407330
add esp, 0x20
mov dword [0x41b624], 0xc
push esi
push 6
call fcn.004036d0
add esp, 4
push eax
call fcn.004038a0
add esp, 8
pop edi
pop esi
pop ebx
add esp, 0x49c
ret
cmp eax, ebx
je 0x407696
cmp eax, 2
je 0x4076c7
cmp eax, edi
jne 0x407740
jmp 0x4076c7
cmp dword [0x41bc48], ebx
jne 0x4076c7
test byte [0x41bc58], 2
jne 0x4076c7
mov ecx, dword [0x41240c]
mov dx, word [0x412410]
mov dword [0x416fd8], ecx
mov word [0x416fdc], dx
mov dword [0x41bcdc], ebx
mov ax, word [0x416fe8]
push esi
push eax
call sub.WSOCK32.dll_htons
mov ecx, dword [0x41bcc4]
and eax, 0xffff
add eax, 0x12
push eax
push 0x416fd8
push ecx
call fcn.00407330
mov eax, dword [0x412020]
add esp, 0x10
cmp eax, edi
jge 0x407740
push eax
push 7
call fcn.004036d0
add esp, 4
lea edx, [esp + 0x42c]
push eax
push str.__s__lu_......
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x41bcb8]
add esp, 0x10
cmp eax, esi
jne 0x407736
lea eax, [esp + 0x428]
push esi
push eax
call fcn.004038a0
add esp, 8
mov dword [0x41b624], 0x10
pop edi
pop esi
pop ebx
add esp, 0x49c
ret