Function at 0x401520
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44c26c
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x469a54]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.00405510
mov dword [edi + 0x5c], eax
test eax, eax
jne 0x401572
push str.Couldnt_new_base_event_n
push 0x46a4b0
call fcn.00404710
add esp, 8
xor al, al
jmp 0x401779
mov eax, 2
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x20], ax
movzx eax, word [edi]
mov ecx, eax
test ax, ax
jne 0x401645
mov esi, 0x1b5a
push 0x46bb50
call fcn.0042e8cf
add esp, 4
test eax, eax
jne 0x40179e
mov edx, dword [0x46bb80]
mov ecx, edx
mov eax, dword [edx + 4]
cmp byte [eax + 0xd], 0
jne 0x4015d5
nop dword [eax + eax]
cmp word [eax + 0xe], si
jae 0x4015cb
mov eax, dword [eax + 8]
jmp 0x4015cf
mov ecx, eax
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x4015c0
cmp byte [ecx + 0xd], 0
jne 0x4015e1
cmp si, word [ecx + 0xe]
jae 0x4015e3
mov ecx, edx
push 0x46bb50
cmp ecx, edx
je 0x4015f9
call fcn.0042e8e0
add esp, 4
lea ebx, [edi + 0x60]
jmp 0x401631
call fcn.0042e8e0
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push eax
push 0xffffffffffffffff
push 0xe
push edi
push 0x4018f0
push dword [edi + 0x5c]
call fcn.00410a70
add esp, 0x1c
mov dword [edi + 0x60], eax
lea ebx, [edi + 0x60]
test eax, eax
jne 0x401640
inc esi
mov eax, 0xc350
cmp si, ax
jb 0x401595
mov word [edi], si
jmp 0x401670
push ecx
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x1e], ax
lea ebx, [edi + 0x60]
lea eax, [ebp - 0x20]
push eax
push 0xffffffffffffffff
push 0xe
push edi
push 0x4018f0
push dword [edi + 0x5c]
call fcn.00410a70
add esp, 0x1c
mov dword [ebx], eax
cmp dword [ebx], 0
jne 0x40169d
push str.Couldnt_open_listener._n
push 0x46a4b0
call fcn.00404710
push dword [edi + 0x5c]
call fcn.00406150
add esp, 0xc
mov dword [edi + 0x5c], 0
xor al, al
jmp 0x401779
cmp byte [ebp + 8], 0
mov byte [edi + 8], 1
je 0x401720
push 8
call fcn.0042ef08
mov esi, eax
mov dword [ebp - 0x2c], esi
push 8
mov dword [ebp - 4], 0
call fcn.0042ef08
mov dword [ebp - 0x24], eax
mov dword [eax], edi
mov dword [eax + 4], 0x4017c0
lea ebx, [esi + 4]
mov byte [ebp - 4], 1
push ebx
push 0
push eax
push 0x402bc0
push 0
push 0
call fcn.004326fd
add esp, 0x20
mov dword [esi], eax
test eax, eax
je 0x4017aa
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 4], esi
cmp dword [ebx], 0
je 0x401797
push dword [esi + 4]
push dword [esi]
call fcn.0042e992
add esp, 8
test eax, eax
jne 0x40179e
mov dword [esi], eax
mov dword [esi + 4], eax
push 1
push dword [edi + 0x5c]
call fcn.00424020
add esp, 8
mov dword [edi + 0x64], eax
cmp byte [edi + 9], 0
jne 0x40175e
push 0x46bb50
call fcn.0042e8cf
add esp, 4
test eax, eax
jne 0x4017a4
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.004027e0
push 0x46bb50
call fcn.0042e8e0
add esp, 4
push edi
push 0x401da0
push 0
push 0xffffffffffffffff
push dword [edi + 0x5c]
lea eax, [edi + 0x70]
push eax
call fcn.00406aa0
add esp, 0x18
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042eefa
mov esp, ebp
pop ebp
ret 4
push 1
call fcn.0042e415
push eax
call fcn.0042e3e8
push eax
call fcn.0042e3e8
push 6
mov dword [ebx], 0
call fcn.0042e415
int3