Function at 0x47c9c0
Capabilities:
Resolve dns
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push str.worker
mov esi, dword [ebx + 0x4a8]
call fcn.00478a50
add esp, 4
mov dword [ebp - 0x18], 0
push 0x55fca4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x55fcc4]
inc eax
mov dword [0x55fcc4], eax
mov edi, dword [0x55fcc4]
push 0x55fca4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 0
push 0
push 0
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
push eax
push dword [0x55fcc0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0x7cb4]
test eax, eax
je 0x47ca48
push 1
push esi
call eax
add esp, 8
mov dword [ebp - 0x10], eax
jmp 0x47ca4f
mov dword [ebp - 0x10], 0
mov ecx, ebx
mov eax, 0x2f149903
sub ecx, dword [esi + 0x10]
imul ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add eax, edx
js 0x47cd40
cmp eax, dword [esi + 0x34]
jae 0x47cd40
push dword [esi + 0x8c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebx + 0x514], eax
test eax, eax
je 0x47cd40
mov eax, dword [esi + 0x8c]
mov dword [ebx + 0x530], eax
lea eax, [esi + 0x7cc8]
mov dword [ebx + 0x4ac], eax
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x56c], eax
mov eax, dword [esi + 0x7cc0]
mov dword [ebx + 0x74], eax
lea eax, [ebx + 0x554]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea edi, [esi + 0x18]
nop dword [eax + eax]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x48]
cmp dword [esi + 0x44], eax
jne 0x47cafb
nop
cmp dword [esi + 0x14], 0
jne 0x47cafb
lea eax, [esi + 0x4c]
push edi
push eax
call fcn.0047ab10
mov eax, dword [esi + 0x48]
add esp, 8
cmp dword [esi + 0x44], eax
je 0x47cae0
mov eax, dword [esi + 0x48]
cmp dword [esi + 0x44], eax
jle 0x47cb73
mov eax, dword [esi + 0x48]
cdq
idiv dword [esi + 0x88]
mov ecx, dword [esi + 0x40]
lea eax, [edx + edx*4]
movups xmm0, xmmword [ecx + eax*8]
movups xmmword [ebx + 0x4b4], xmm0
movups xmm0, xmmword [ecx + eax*8 + 0x10]
movups xmmword [ebx + 0x4c4], xmm0
movq xmm0, qword [ecx + eax*8 + 0x20]
movq qword [ebx + 0x4d4], xmm0
mov eax, dword [esi + 0x48]
inc eax
mov dword [esi + 0x48], eax
mov eax, dword [esi + 0x48]
cmp eax, dword [esi + 0x88]
jle 0x47cb73
nop word [eax + eax]
mov eax, dword [esi + 0x48]
sub eax, dword [esi + 0x88]
mov dword [esi + 0x48], eax
mov eax, dword [esi + 0x44]
sub eax, dword [esi + 0x88]
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x48]
cmp eax, dword [esi + 0x88]
jg 0x47cb50
lea eax, [esi + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x80]
lea edx, [esi + 0x68]
test eax, eax
je 0x47cb9d
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
push ecx
mov dword [edx + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea edx, [esi + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esi + 0x14], 0
jne 0x47cccd
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
mov dword [ebx + 0x4e0], eax
movzx eax, word [ebx + 0x4ca]
mov dword [ebx + 0x4e4], edx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebx + 0x68], eax
movzx eax, word [ebx + 0x4ba]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
lea ecx, [ebx + 0x2c]
mov dword [ebx + 0x6c], eax
lea eax, [ebx + 0x4c8]
mov byte [ecx], 0
test eax, eax
je 0x47cc23
cmp word [eax], 2
jne 0x47cc23
push 2
push 0
push 0
push 0x30
push ecx
push 0x10
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
mov cl, byte [ebx + 0x4d8]
movzx eax, cl
mov dword [ebx + 0x70], eax
test cl, cl
jne 0x47cad0
mov eax, dword [ebx + 0x4ac]
push 0x51e854
push dword [eax + 0x2c]
call fcn.00479650
add esp, 8
test eax, eax
je 0x47cc5b
mov dword [ebx + 0x51c], 1
mov eax, dword [ebx + 0x4a8]
mov dword [ebx + 0x538], 0
mov dword [ebx + 0x52c], 0
mov dword [ebx], 0
mov dword [ebx + 0x284], 0
mov dword [ebx + 0x78], 0
mov ecx, dword [eax + 0x7cbc]
test ecx, ecx
je 0x47ccb2
cmp dword [eax], 1
jne 0x47ccb2
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push ebx
call ecx
mov eax, dword [ebp + 8]
add esp, 8
mov dword [ebx + 0x78], eax
push ebx
mov dword [ebx], 1
mov dword [ebx + 4], 0
call fcn.0047a4a0
add esp, 4
jmp 0x47cad0
mov eax, dword [esi + 0x7cb8]
test eax, eax
je 0x47cce2
push dword [ebp - 0x10]
push 1
push esi
call eax
add esp, 0xc
push 0
push dword [0x55fcc0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebx + 0x554]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push dword [ebx + 0x514]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [ebx + 0x530], 0
call esi
mov eax, dword [ebx + 0x1c]
add esp, 4
mov dword [ebx + 0x514], 0
cmp eax, dword [ebx + 0x18]
je 0x47cd40
push eax
call esi
add esp, 4
mov dword [ebx + 0x1c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret