Function at 0x47a960
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 0x47aa63
mov eax, dword [ebp + 8]
test eax, eax
je 0x47aa2d
cmp eax, 1
je 0x47aa2d
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 str.__x:_x:_x:_x:_x:_x:_x:_x_
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 0x4fa5c0
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 [0x54f9e4]
test edi, edi
je 0x47ab04
mov eax, dword [ebp + 8]
test eax, eax
je 0x47aa7d
cmp eax, 1
jne 0x47aa88
mov ecx, dword [edi]
test ecx, ecx
je 0x47aae7
cmp ecx, 1
je 0x47aae7
cmp eax, 2
je 0x47aa92
cmp eax, 3
jne 0x47aaf3
mov ecx, dword [edi]
cmp ecx, 2
je 0x47aa9e
cmp ecx, 3
jne 0x47aaf3
mov eax, dword [ebp + 0x18]
lea edx, [edi + 0x110]
mov esi, 0xc
nop dword [eax]
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x47aae2
add edx, 4
add eax, 4
sub esi, 4
jae 0x47aab0
lea eax, [edi + 4]
push eax
lea ecx, [ebp + 0xc]
call fcn.004665b0
push dword [eax]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.004c913a
mov edx, dword [ebp + 0xc]
jmp 0x47abdb
mov eax, dword [ebp + 8]
jmp 0x47aaf3
cmp dword [edi + 0x10c], ebx
je 0x47abbf
mov edi, dword [edi + 0x120]
test edi, edi
jne 0x47aa74
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 0x4fa5c0
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.00415290
add esp, 0x1c
push 0x550370
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x54f9e8]
test eax, eax
je 0x47ab59
cmp dword [eax + 0x10c], ebx
je 0x47abab
mov eax, dword [eax + 0x120]
test eax, eax
jne 0x47ab47
push 0x124
call fcn.004c8d7a
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 0x47ab8a
movups xmm0, xmmword [eax]
movups xmmword [edx + 0x110], xmm0
mov eax, dword [0x54f9e8]
push edx
push 0
mov dword [edx + 0x120], eax
push 0x478e00
mov dword [0x54f9e8], edx
call fcn.004d6098
add esp, 0xc
push 0x550370
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.004665b0
push dword [eax]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.004c913a
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 0x47abf6
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