Function at 0x1000daf8
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x728
push ebx
push dword [ebp + 0x14]
xor ebx, ebx
push str.CheckExternPortConnection__:_dwSrcPortsCount_u
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
call fcn.10018570
push 0x114010c
call fcn.10019ae0
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x1000db4c
push str.extip:_CheckExternPortConnection__:_mem_alloc___failed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call main
pop ecx
pop ecx
or eax, 0xffffffff
jmp 0x1000dfd3
cmp dword [0x10050324], 6
mov dword [ebp - 4], ebx
jb 0x1000db9b
cmp dword [0x10051750], 3
jne 0x1000dbda
push 0x792
call fcn.1001b7e0
mov dword [esp], 0x10051d78
push dword [0x10051f84]
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x728]
push 0x208
push eax
call fcn.10019e20
lea eax, [ebp - 4]
push eax
call fcn.1001ba10
add esp, 0x18
jmp 0x1000dbda
call fcn.100241b0
test eax, eax
je 0x1000dbda
push 0x17d
call fcn.1001b7e0
push dword [0x10051f84]
mov dword [ebp - 4], eax
push 0x10051d78
push eax
lea eax, [ebp - 0x728]
push 0x104
push eax
call fcn.10019e20
lea eax, [ebp - 4]
push eax
call fcn.1001ba10
add esp, 0x1c
push esi
push edi
cmp word [ebp - 0x728], bx
je 0x1000dc37
lea eax, [ebp - 0x728]
push eax
push str.extip:_CheckExternPortConnection__:_firewal_install_cmd__S
call fcn.10018570
xor esi, esi
inc esi
push esi
push ebx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x728]
push eax
call fcn.10021250
add esp, 0x18
test eax, eax
je 0x1000dc20
push 0x1388
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x410
lea eax, [ebp - 0x728]
push ebx
push eax
call fcn.10019d20
add esp, 0xc
jmp 0x1000dc42
push str.extip:_CheckExternPortConnection__:_firewal_not_run__not_enough_permissions
call fcn.10018570
pop ecx
xor edi, edi
cmp dword [ebp + 0x14], ebx
jbe 0x1000dcd5
xor esi, esi
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 8]
lea eax, [eax + edi*2]
mov cx, word [eax]
mov word [esi + edx + 0x114], cx
movzx eax, word [eax]
push eax
push ebx
call fcn.1001c820
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
mov dword [esi + ecx + 0x10c], eax
mov ecx, dword [ebp - 8]
lea eax, [esi + ecx]
cmp dword [eax + 0x10c], ebx
jge 0x1000dca5
movzx eax, word [eax + 0x114]
push eax
push str.extip:_CheckExternPortConnection__:_tcp_listen___failed_port__u
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call main
add esp, 0xc
jmp 0x1000dca7
inc dword [ecx]
mov eax, dword [ebp - 8]
or dword [esi + eax + 0x110], 0xffffffff
mov eax, dword [ebp - 8]
mov dword [esi + eax + 0x118], ebx
mov eax, dword [ebp - 8]
inc dword [eax + 0x108]
inc edi
add esi, 0x114
cmp edi, dword [ebp + 0x14]
jb 0x1000dc4f
mov eax, dword [ebp - 8]
push 0x10050d7c
push 0x32
add eax, 8
push 0x14
push eax
call fcn.10018c60
add esp, 0x10
cmp dword [ebp - 0x10], ebx
jne 0x1000dd09
push str.extip:_CheckExternPortConnection__:_waiting_20_seconds...
call fcn.10018570
mov dword [esp], 0x4e20
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push ebx
push dword [ebp - 8]
push 0x1000d6d5
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x1000dd41
push str.extip:_CheckExternPortConnection__:_cannot_create_thread
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call main
pop ecx
pop ecx
mov dword [ebp - 4], 0xfffffffe
jmp 0x1000df4c
push 0x260
call fcn.1001b900
push ebx
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
push 0x10032634
push dword [ebp + 8]
lea eax, [ebp - 0x318]
push dword [0x1005266c]
push 0xff
push eax
push 0x10033426
call fcn.10019170
lea eax, [ebp - 0xc]
push eax
call fcn.1001ba10
push 0x7f4
call fcn.1001b900
mov ecx, dword [ebp - 8]
add ecx, 8
push ecx
push eax
mov dword [ebp - 4], eax
mov edi, 0x1ff
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.10019db0
lea eax, [ebp - 4]
add esp, 0x40
push eax
call fcn.1001ba10
pop ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0x14], ebx
jbe 0x1000de29
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 4], ebx
jbe 0x1000dddc
push 0x1003a6bc
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
movzx eax, word [ecx + eax + 0x114]
push eax
push 0x10033634
lea eax, [ebp - 0x218]
push eax
call esi
mov ecx, edi
sub ecx, eax
push ecx
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp + eax - 0x218]
push eax
call fcn.10019db0
add dword [ebp - 0xc], 0x114
add esp, 0x10
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jb 0x1000ddc5
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x318]
push eax
push str.extip:_CheckExternPortConnection__:_szUrl_s_szPostData_s
call fcn.10018570
lea eax, [ebp - 0x218]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1000de4d
push ebx
lea ecx, [ebp - 0x18]
push ecx
sub eax, edx
lea ecx, [ebp - 0x14]
push ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x318]
push eax
call fcn.1001b3f0
add esp, 0x18
test eax, eax
jns 0x1000de90
push ebx
push dword [ebp - 0x10]
mov dword [ebp - 4], 0xfffffffd
call dword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x1000df4c
cmp dword [ebp - 0x14], ebx
je 0x1000dea8
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push str.extip:_CheckExternPortConnection__:_wpost___ok:__s_dwBufLen_u
call fcn.10018570
add esp, 0xc
push 0x100
lea eax, [ebp - 0x318]
push ebx
push eax
call fcn.10019d20
push 0x200
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.10019d20
add esp, 0x18
push 0x88b8
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0x14]
xor esi, esi
mov dword [ebp - 4], esi
cmp eax, ebx
jbe 0x1000df43
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
cmp dword [eax + 0x118], ebx
je 0x1000df19
mov dx, word [eax + 0x114]
mov edi, dword [ebp + 0x18]
mov word [edi + esi*2], dx
inc esi
mov ecx, str.open
cmp dword [eax + 0x118], ebx
jne 0x1000df1e
mov ecx, str.closed
movzx eax, word [eax + 0x114]
push ecx
push eax
push str.extip:_CheckExternPortConnection__:_Port__u:__s
call fcn.10018570
add dword [ebp - 0xc], 0x114
add esp, 0xc
dec dword [ebp - 4]
jne 0x1000deef
mov dword [ebp - 4], esi
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x1000df4c
mov dword [eax], esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], ebx
je 0x1000dfb1
cmp dword [ebp + 0x14], ebx
jbe 0x1000dfb1
mov eax, dword [ebp + 0x14]
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
xor esi, esi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov eax, dword [esi + eax + 0x10c]
or edi, 0xffffffff
cmp eax, edi
je 0x1000df8b
push eax
call ebx
mov eax, dword [ebp - 8]
mov dword [esi + eax + 0x10c], edi
mov eax, dword [ebp - 8]
mov eax, dword [esi + eax + 0x110]
cmp eax, edi
je 0x1000dfa6
push eax
call ebx
mov eax, dword [ebp - 8]
mov dword [esi + eax + 0x110], edi
add esi, 0x114
dec dword [ebp - 0x10]
jne 0x1000df6d
lea eax, [ebp - 8]
push 0x114010c
push eax
call fcn.10019b10
push dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
call fcn.10019b10
mov eax, dword [ebp - 4]
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret