Function at 0x47a6c0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
push esi
call dword [sym.imp.WS2_32.dll_htonl]
cmp byte [ebp + 0xc], 0
mov ebx, eax
jne 0x47a7c3
mov eax, dword [ebp + 8]
test eax, eax
je 0x47a78d
cmp eax, 1
je 0x47a78d
mov edi, dword [ebp + 0x18]
mov esi, dword [sym.imp.WS2_32.dll_htons]
movzx eax, word [edi + 0xe]
push eax
call esi
movzx eax, ax
mov dword [ebp + 0xc], eax
movzx eax, word [edi + 0xc]
push eax
call esi
movzx eax, ax
mov dword [ebp - 4], eax
movzx eax, word [edi + 0xa]
push eax
call esi
movzx eax, ax
mov dword [ebp - 8], eax
movzx eax, word [edi + 8]
push eax
call esi
movzx eax, ax
mov dword [ebp - 0xc], eax
movzx eax, word [edi + 6]
push eax
call esi
movzx ebx, ax
movzx eax, word [edi + 4]
push eax
call esi
movzx edi, ax
mov eax, dword [ebp + 0x18]
movzx eax, word [eax + 2]
push eax
call esi
movzx esi, ax
mov eax, dword [ebp + 0x18]
movzx eax, word [eax]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push dword [ebp + 0xc]
movzx eax, ax
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
push ebx
push edi
push esi
push eax
push 0x50f5d0
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.00415290
add esp, 0x2c
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, bl
push eax
mov eax, ebx
shr eax, 8
movzx eax, al
push eax
mov eax, ebx
shr ebx, 0x18
shr eax, 0x10
movzx eax, al
push eax
push ebx
push 0x4fc5c0
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.00415290
add esp, 0x1c
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [0x555a14]
test edi, edi
je 0x47a864
mov eax, dword [ebp + 8]
test eax, eax
je 0x47a7dd
cmp eax, 1
jne 0x47a7e8
mov ecx, dword [edi]
test ecx, ecx
je 0x47a847
cmp ecx, 1
je 0x47a847
cmp eax, 2
je 0x47a7f2
cmp eax, 3
jne 0x47a853
mov ecx, dword [edi]
cmp ecx, 2
je 0x47a7fe
cmp ecx, 3
jne 0x47a853
mov eax, dword [ebp + 0x18]
lea edx, [edi + 0x110]
mov esi, 0xc
nop dword [eax]
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x47a842
add edx, 4
add eax, 4
sub esi, 4
jae 0x47a810
lea eax, [edi + 4]
push eax
lea ecx, [ebp + 0xc]
call fcn.00466b40
push dword [eax]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.004c905a
mov edx, dword [ebp + 0xc]
jmp 0x47a93b
mov eax, dword [ebp + 8]
jmp 0x47a853
cmp dword [edi + 0x10c], ebx
je 0x47a91f
mov edi, dword [edi + 0x120]
test edi, edi
jne 0x47a7d4
mov esi, dword [ebp + 0x14]
movzx eax, bl
push eax
mov eax, ebx
shr eax, 8
movzx eax, al
push eax
mov eax, ebx
shr eax, 0x10
movzx eax, al
push eax
mov eax, ebx
shr eax, 0x18
push eax
push 0x4fc5c0
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.00415290
add esp, 0x1c
push 0x55639c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x555a18]
test eax, eax
je 0x47a8b9
cmp dword [eax + 0x10c], ebx
je 0x47a90b
mov eax, dword [eax + 0x120]
test eax, eax
jne 0x47a8a7
push 0x124
call fcn.004c8c9a
mov ecx, dword [ebp + 8]
mov edx, eax
mov eax, dword [ebp + 0x18]
add esp, 4
mov dword [edx], ecx
mov dword [edx + 0x108], esi
mov dword [edx + 0x10c], ebx
test eax, eax
je 0x47a8ea
movups xmm0, xmmword [eax]
movups xmmword [edx + 0x110], xmm0
mov eax, dword [0x555a18]
push edx
push 0
mov dword [edx + 0x120], eax
push 0x478cf0
mov dword [0x555a18], edx
call fcn.004d5fba
add esp, 0xc
push 0x55639c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edi + 4]
push eax
lea ecx, [ebp - 0xc]
call fcn.00466b40
push dword [eax]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.004c905a
mov edx, dword [ebp - 0xc]
or eax, 0xffffffff
add edx, 0xfffffff0
add esp, 0xc
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47a956
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret