Function at 0x4041c0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateThread]
push esi
mov esi, ecx
push edi
cmp dword [esi + 4], 0
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x404596
push 0
push dword [esi + 0xeb90]
call ebx
push dword [esi + 0xeb90]
call edi
push 0
push dword [esi + 0xeb94]
mov dword [esi + 0xeb90], 0
call ebx
push dword [esi + 0xeb94]
call edi
mov edi, dword [esi + 4]
mov dword [esi + 0xeb94], 0
mov dword [esi + 0x2dc], 0
mov eax, dword [edi + 0x10c]
test eax, eax
je 0x40423f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x10c], 0
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40424c
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [esi + 4], 0
jmp 0x404260
mov eax, dword [esi + 0xeb88]
test eax, eax
je 0x404330
mov ecx, dword [esi + 0xeb84]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xeb88], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xeb88]
add esp, 0xc
test ecx, ecx
je 0x40430a
mov eax, dword [esi + 0xeb8c]
sub eax, ecx
cmp eax, 0x64
jb 0x40430a
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x40430a
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xeb88]
shl ecx, 2
push ecx
push dword [esi + 0xeb84]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xeb84]
add esp, 0x18
test eax, eax
je 0x4042f5
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xeb88]
add eax, 0xa
mov dword [esi + 0xeb84], edi
mov dword [esi + 0xeb8c], eax
mov eax, dword [ebx + 8]
test eax, eax
je 0x40431a
push eax
call fcn.00414cc3
add esp, 4
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x404260
mov eax, dword [esi + 0xeb60]
test eax, eax
je 0x404400
mov ecx, dword [esi + 0xeb5c]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xeb60], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xeb60]
add esp, 0xc
test ecx, ecx
je 0x4043da
mov eax, dword [esi + 0xeb64]
sub eax, ecx
cmp eax, 0x64
jb 0x4043da
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x4043da
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xeb60]
shl ecx, 2
push ecx
push dword [esi + 0xeb5c]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xeb5c]
add esp, 0x18
test eax, eax
je 0x4043c5
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xeb60]
add eax, 0xa
mov dword [esi + 0xeb5c], edi
mov dword [esi + 0xeb64], eax
mov eax, dword [ebx + 8]
test eax, eax
je 0x4043ea
push eax
call fcn.00414cc3
add esp, 4
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x404330
mov eax, dword [esi + 0xab04]
test eax, eax
je 0x4044c0
mov ecx, dword [esi + 0xab00]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xab04], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xab04]
add esp, 0xc
test ecx, ecx
je 0x4044aa
mov eax, dword [esi + 0xab08]
sub eax, ecx
cmp eax, 0x64
jb 0x4044aa
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x4044aa
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xab04]
shl ecx, 2
push ecx
push dword [esi + 0xab00]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xab00]
add esp, 0x18
test eax, eax
je 0x404495
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xab04]
add eax, 0xa
mov dword [esi + 0xab00], edi
mov dword [esi + 0xab08], eax
test ebx, ebx
je 0x404400
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x404400
mov eax, dword [esi + 0xab2c]
test eax, eax
je 0x404580
mov ecx, dword [esi + 0xab28]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xab2c], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xab2c]
add esp, 0xc
test ecx, ecx
je 0x40456a
mov eax, dword [esi + 0xab30]
sub eax, ecx
cmp eax, 0x64
jb 0x40456a
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x40456a
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xab2c]
shl ecx, 2
push ecx
push dword [esi + 0xab28]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xab28]
add esp, 0x18
test eax, eax
je 0x404555
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xab2c]
add eax, 0xa
mov dword [esi + 0xab28], edi
mov dword [esi + 0xab30], eax
test ebx, ebx
je 0x4044c0
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x4044c0
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xaae0], 0
cmp dword [esi + 8], 0
je 0x40491a
push 0
push dword [esi + 0xeb90]
call ebx
push dword [esi + 0xeb90]
call edi
push 0
push dword [esi + 0xeb94]
mov dword [esi + 0xeb90], 0
call ebx
push dword [esi + 0xeb94]
call edi
mov dword [esi + 0xeb94], 0
mov dword [esi + 0x2dc], 0
mov dword [esi + 8], 0
lea esp, [esp]
mov eax, dword [esi + 0xeb88]
test eax, eax
je 0x4046c0
mov ecx, dword [esi + 0xeb84]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xeb88], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xeb88]
add esp, 0xc
test ecx, ecx
je 0x40469a
mov eax, dword [esi + 0xeb8c]
sub eax, ecx
cmp eax, 0x64
jb 0x40469a
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x40469a
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xeb88]
shl ecx, 2
push ecx
push dword [esi + 0xeb84]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xeb84]
add esp, 0x18
test eax, eax
je 0x404685
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xeb88]
add eax, 0xa
mov dword [esi + 0xeb84], edi
mov dword [esi + 0xeb8c], eax
mov eax, dword [ebx + 8]
test eax, eax
je 0x4046aa
push eax
call fcn.00414cc3
add esp, 4
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x4045f0
mov eax, dword [esi + 0xeb60]
test eax, eax
je 0x404790
mov ecx, dword [esi + 0xeb5c]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xeb60], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xeb60]
add esp, 0xc
test ecx, ecx
je 0x40476a
mov eax, dword [esi + 0xeb64]
sub eax, ecx
cmp eax, 0x64
jb 0x40476a
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x40476a
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xeb60]
shl ecx, 2
push ecx
push dword [esi + 0xeb5c]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xeb5c]
add esp, 0x18
test eax, eax
je 0x404755
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xeb60]
add eax, 0xa
mov dword [esi + 0xeb5c], edi
mov dword [esi + 0xeb64], eax
mov eax, dword [ebx + 8]
test eax, eax
je 0x40477a
push eax
call fcn.00414cc3
add esp, 4
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x4046c0
mov eax, dword [esi + 0xab04]
test eax, eax
je 0x404850
mov ecx, dword [esi + 0xab00]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xab04], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xab04]
add esp, 0xc
test ecx, ecx
je 0x40483a
mov eax, dword [esi + 0xab08]
sub eax, ecx
cmp eax, 0x64
jb 0x40483a
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x40483a
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xab04]
shl ecx, 2
push ecx
push dword [esi + 0xab00]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xab00]
add esp, 0x18
test eax, eax
je 0x404825
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xab04]
add eax, 0xa
mov dword [esi + 0xab00], edi
mov dword [esi + 0xab08], eax
test ebx, ebx
je 0x404790
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x404790
mov eax, dword [esi + 0xab2c]
test eax, eax
je 0x404910
mov ecx, dword [esi + 0xab28]
dec eax
mov ebx, dword [ecx]
mov dword [esi + 0xab2c], eax
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00414590
mov ecx, dword [esi + 0xab2c]
add esp, 0xc
test ecx, ecx
je 0x4048fa
mov eax, dword [esi + 0xab30]
sub eax, ecx
cmp eax, 0x64
jb 0x4048fa
lea eax, [ecx*4 + 0x28]
push eax
mov dword [ebp - 4], eax
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x4048fa
push dword [ebp - 4]
push 0
push edi
call fcn.0041e930
mov ecx, dword [esi + 0xab2c]
shl ecx, 2
push ecx
push dword [esi + 0xab28]
push edi
call fcn.0041bfc0
mov eax, dword [esi + 0xab28]
add esp, 0x18
test eax, eax
je 0x4048e5
push eax
call fcn.00414cc3
add esp, 4
mov eax, dword [esi + 0xab2c]
add eax, 0xa
mov dword [esi + 0xab28], edi
mov dword [esi + 0xab30], eax
test ebx, ebx
je 0x404850
push ebx
call fcn.00414cc3
add esp, 4
jmp 0x404850
mov dword [esi + 0xaae0], 0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret