Function at 0x49a9b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x51e080]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [0x522474]
push esi
push edi
mov dword [ebp - 0x60], ebx
cmp dword [ebx + 8], 1
je 0x49afea
cmp dword [ebx + 0x408], 0
jne 0x49afea
cmp dword [ebx + 0x4f8], 0
je 0x49afea
mov ecx, ebx
call fcn.00498830
mov esi, dword [ebx + 0x49c]
mov eax, dword [ebx + 0x27c]
mov edi, dword [ebx + 0x278]
mov dword [ebp - 0x58], eax
cmp dword [esi + 4], 1
jne 0x49aa19
mov ecx, esi
call fcn.004a7f80
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp edi, 0x20000
jae 0x49aa32
mov edi, 0x20000
jmp 0x49aa3c
mov eax, 0x1000000
cmp edi, eax
cmova edi, eax
mov eax, dword [ebp - 0x58]
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], 1
cmp eax, 0x20
jae 0x49aa55
mov eax, 0x20
jmp 0x49aa5f
mov ecx, 0x400
cmp eax, ecx
cmova eax, ecx
shl eax, 0x14
mov dword [esi + 0x48], eax
lea eax, [edi + edi*4]
shl eax, 4
push eax
call fcn.004d9a7e
mov ecx, dword [esi + 0x34]
add esp, 4
mov dword [esi + 0x2c], eax
lea ecx, [ecx + ecx*4]
shl ecx, 4
push ecx
push 0
push eax
call fcn.004d6ed0
mov eax, dword [esi + 0x2c]
add esp, 0xc
mov dword [esi + 0x30], eax
mov dword [eax + 0x14], 3
mov ecx, dword [esi + 0x34]
mov dword [esi + 0x4c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
lea eax, [ecx + ecx*4]
shl eax, 4
lea edi, [ecx - 1]
add eax, dword [esi + 0x48]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x2c]
add eax, 0x50
mov dword [esi + 0x3c], eax
cmp edi, 1
jbe 0x49aae8
mov edx, 0x50
dec edi
mov ecx, dword [esi + 0x2c]
lea eax, [ecx + 0x50]
add eax, edx
mov dword [ecx + edx + 0xc], eax
add edx, 0x50
sub edi, 1
jne 0x49aad4
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi + 8]
call fcn.004aac90
mov ecx, ebx
mov dword [esi + 4], 1
call fcn.0049a2e0
mov ecx, dword [ebx + 0x4d8]
call fcn.00423fd0
mov esi, dword [ebx + 0x4d8]
lea edi, [esi + 0x48]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x68]
push edi
mov dword [ebp - 0x54], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebx + 0x4b0]
mov esi, dword [edi + 0x118]
mov dword [ebp - 0x64], esi
lea eax, [esi + 0xc]
push eax
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x4d8]
mov esi, dword [eax + 0xb8]
lea eax, [esi + 8]
push eax
mov dword [ebp - 0x58], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edx, edx
mov eax, 0xf827928a
div dword [esi + 0x20]
mov eax, dword [esi + 0x2c]
mov ecx, dword [eax + edx*4]
test ecx, ecx
je 0x49ab93
nop dword [eax]
cmp dword [ecx], 0xf827928a
je 0x49af94
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x49ab80
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x54]
mov ecx, edi
push dword [edi + 0x2c]
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 0
call fcn.0049f250
test eax, eax
je 0x49ac1e
mov ecx, dword [edi + 0x114]
lea eax, [ebp - 0x54]
push eax
mov edx, str.perfect_dark.sekai
call fcn.00495800
mov esi, dword [ebp - 0x54]
add esp, 4
mov ecx, edi
push esi
call fcn.0049f250
test eax, eax
jne 0x49ac15
mov eax, dword [edi + 0x114]
lea edx, [ebp - 0x54]
push 0x23ee676e
push edx
mov edi, dword [eax + 0x478]
mov ecx, dword [edi + 0x6c]
mov eax, dword [ecx]
call dword [eax]
test eax, eax
jne 0x49ac15
push dword [ebp - 0x54]
mov ecx, edi
push 0xbcd3f497
call fcn.0045bc70
push esi
call fcn.004d9a63
add esp, 4
mov ebx, dword [ebx + 0x4d8]
mov dword [ebp - 0x5c], ebx
cmp dword [ebx + 4], 1
jne 0x49ac34
mov ecx, ebx
call fcn.00426530
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
lea esi, [ebx + 0xdc]
mov dword [ebx + 0xd8], eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
mov dword [ebx + 0xd0], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x64]
push eax
push 0
push ebx
push 0x421410
push 0
push 0
call fcn.004d9be5
add esp, 0x18
mov dword [ebx + 0xd4], eax
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov esi, dword [ebx + 0xc0]
mov dword [ebp - 0x54], esi
cmp dword [esi + 4], 1
jne 0x49aca3
mov ecx, esi
call fcn.00430350
mov eax, dword [esi + 0x20]
mov esi, dword [esi + 0xb4]
mov ebx, dword [eax + 0x488]
lea edi, [ebx + 4]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x40
push esi
mov ecx, ebx
call fcn.004b0e10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp - 0x54]
push 0x10
push dword [ebx + 0xb4]
mov ecx, dword [ebx + 0xc0]
call fcn.004b42f0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 0x2c], eax
lea eax, [ebp - 0x58]
push eax
push 0
push ebx
push 0x42db80
push 0
push 0
call fcn.004d9be5
add esp, 0x18
mov dword [ebx + 0x28], eax
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0
push 0
lea esi, [ebx + 0x30]
push esi
call fcn.004aed30
mov ecx, dword [ebx + 0x20]
lea eax, [ebp - 0x14]
push 0xc
push eax
mov eax, dword [ebx + 0xb0]
mov ecx, dword [ecx + 0x49c]
add eax, 0x10
push eax
push esi
mov dword [ebp - 0x14], 3
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
call fcn.004a72a0
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0042fe50
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x60]
mov dword [ebx + 4], 1
mov dword [eax + 4], 1
mov ebx, dword [esi + 0x4b0]
mov esi, dword [esi + 0x308]
lea edi, [ebx + 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
mov dword [ebx + 8], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 1
lea eax, [ebp - 0x38]
push eax
call fcn.004ae980
mov dword [ebp - 0x18], 3
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x10], 1
push 0xc
mov ebx, dword [ebp - 0x60]
push eax
mov eax, dword [ebx + 0x4a0]
mov ecx, dword [ebx + 0x49c]
add eax, 0x10
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.004a72a0
push 2
lea eax, [ebp - 0x38]
push eax
call fcn.004ae980
mov ecx, dword [ebx + 0x49c]
lea eax, [ebp - 0x18]
push 0xc
push eax
mov eax, dword [ebx + 0x4a0]
add eax, 0x10
mov dword [ebp - 0x18], 3
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x14], 1
push eax
mov dword [ebp - 0x10], 2
call fcn.004a72a0
push 3
lea eax, [ebp - 0x38]
push eax
call fcn.004ae980
mov ecx, dword [ebx + 0x49c]
lea eax, [ebp - 0x18]
push 0xc
push eax
mov eax, dword [ebx + 0x4a0]
add eax, 0x10
mov dword [ebp - 0x18], 3
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x14], 1
push eax
mov dword [ebp - 0x10], 3
call fcn.004a72a0
push 4
lea eax, [ebp - 0x38]
push eax
call fcn.004ae980
push ecx
mov ecx, dword [ebx + 0x49c]
lea eax, [ebp - 0x38]
push 0
push 0
push eax
call fcn.004a7df0
mov edx, dword [ebx + 0x4e0]
cmp dword [edx + 4], 1
jne 0x49ae8e
mov dword [edx + 4], 0
mov ecx, dword [edx + 0x4c]
add ecx, 0x20
je 0x49aeb7
mov eax, dword [edx + 0x18]
mov eax, dword [eax + 0x158]
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ecx + 0x10], xmm0
movq xmm0, qword [eax + 0x20]
movq qword [ecx + 0x20], xmm0
mov dword [edx + 4], 1
mov esi, dword [ebx + 0x4e4]
cmp dword [esi + 4], 1
jne 0x49aed1
mov ecx, esi
call fcn.00483d30
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push 0
push 0
call edi
mov dword [esi + 0x14], eax
lea eax, [ebp - 0x54]
push eax
push 0
push esi
push 0x483a10
push 0
push 0
mov dword [esi + 0xc], 1
call fcn.004d9be5
mov dword [esi + 0x10], eax
add esp, 0x18
mov dword [esi + 4], 1
mov esi, dword [ebx + 0x4e8]
cmp dword [esi + 4], 1
jne 0x49af20
mov ecx, esi
call fcn.00409e40
push 0
push 0
push 0
push 0
call edi
mov dword [esi + 0x18], eax
lea eax, [ebp - 0x54]
push eax
push 0
push esi
push 0x409c80
push 0
push 0
mov dword [esi + 0x10], 1
call fcn.004d9be5
add esp, 0x18
mov dword [esi + 0x14], eax
mov dword [esi + 4], 1
mov ecx, dword [ebx + 0x4bc]
call fcn.00478780
mov eax, dword [ebp + 8]
mov dword [ebx + 0x244], eax
test al, 8
je 0x49af78
mov dword [ebx + 0x41c], 1
mov dword [ebx + 8], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4
cmp dword [ecx + 8], reloc.WS2_32.dll_closesocket
jne 0x49ab93
cmp dword [ecx + 0xc], 0x18
lea eax, [ebp - 0x50]
mov esi, 0x18
cmovb esi, dword [ecx + 0xc]
push esi
push dword [ecx + 0x14]
push eax
call fcn.004d6950
add esp, 0xc
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp esi, 0x18
jne 0x49ab9c
mov eax, dword [ebp - 0x64]
movups xmm0, xmmword [ebp - 0x50]
movups xmmword [eax + 0x28], xmm0
movq xmm0, qword [ebp - 0x40]
movq qword [eax + 0x38], xmm0
jmp 0x49ab9c
mov ecx, dword [ebp - 8]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4