Function at 0x421ed0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x58cce8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x5f4760]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
lea edi, [ebx + 0xc24]
mov dword [esp + 0x24], edi
jmp 0x421f14
mov edi, dword [esp + 0x24]
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], esi
cmp edi, esi
je 0x421f33
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x60], 0
cmp dword [ebx + 0xc20], 0
je 0x421f95
mov eax, dword [ebx + 0xc1c]
lea edi, [ebx + 0xc08]
mov ebx, dword [eax]
mov eax, dword [edi]
test eax, eax
jne 0x422081
call fcn.004a35f3
xor eax, eax
cmp ebx, dword [eax + 0x14]
jne 0x421f6d
call fcn.004a35f3
mov eax, dword [ebx + 8]
mov ecx, dword [edi]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x14]
mov eax, dword [eax]
push eax
push ecx
lea ebx, [esp + 0x40]
call fcn.00422be0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc20]
mov dword [esp + 0x20], edx
mov ebx, ecx
mov dword [esp + 0x60], 0xffffffff
test esi, esi
je 0x421fa8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x18], 0
je 0x422146
mov edi, ebx
call fcn.00422180
cmp eax, 0xc8
jle 0x421fd7
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, ebx
call fcn.00422180
cmp eax, 0xc8
jg 0x421fc1
mov dword [esp + 0x14], 0
mov dword [esp + 0x60], 1
mov eax, dword [esp + 0x18]
lea esi, [esp + 0x14]
call fcn.00469280
mov esi, dword [esp + 0x14]
test esi, esi
je 0x422122
lea edi, [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0
push 0x10000
push esi
push 0x421cc0
push 0x6000
push 0
mov dword [esi + 0x6c], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x422088
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x422044
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x42205e
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
push 9
call fcn.00423790
mov ecx, dword [esp + 0x18]
call fcn.00421e20
lea esi, [esp + 0x14]
call fcn.0042d4b0
mov esi, dword [esp + 0x14]
jmp 0x422122
mov eax, dword [eax]
jmp 0x421f63
lea edi, [ebx + 0xc5c]
mov dword [esp + 0x1c], 0
test edi, edi
je 0x4220a5
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x1c], edi
mov byte [esp + 0x60], 2
mov eax, dword [ebx + 0xc54]
mov ecx, dword [ebx + 0xc3c]
lea edi, [ebx + 0xc3c]
lea edx, [esp + 0x14]
mov dword [esp + 0x34], eax
push edx
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x38], ecx
call fcn.0042d420
mov ebx, eax
mov eax, dword [ebx]
test eax, eax
je 0x4220e1
cmp eax, dword [esp + 0x30]
je 0x4220e6
call fcn.004a35f3
mov ecx, dword [esp + 0x34]
cmp dword [ebx + 4], ecx
jne 0x422100
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x4c]
push eax
mov ebx, edi
call fcn.0042d030
mov byte [esp + 0x60], 1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x422114
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x60], 0xffffffff
test esi, esi
je 0x422146
lea edx, [esi + 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x422146
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
cmp byte [ebx + 0xc90], 0
jne 0x422169
cmp dword [esp + 0x20], 0
jne 0x421f10
mov eax, 0x7530
call fcn.00493180
jmp 0x421f10
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4