Function at 0x4f5fe0
Capabilities:
Create thread

Disassembly:
sub esp, 8
push esi
push edi
mov edi, ecx
mov dword [esp + 8], edi
mov eax, dword [edi + 0x3c]
lea ecx, [edi + 0x38]
push eax
mov edx, dword [eax]
lea eax, [esp + 0x10]
push edx
push eax
call fcn.004f6700
mov eax, dword [esp + 0x14]
xor esi, esi
cmp dword [eax - 8], esi
jne 0x4f6045
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4f61da
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4f61da
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
pop edi
pop esi
add esp, 8
ret 4
push ebx
push ebp
lea ebp, [eax - 0xc]
mov dword [edi + 0x4c], esi
mov ebx, dword [eax - 8]
cmp dword [ebp], 1
jg 0x4f605b
cmp dword [eax - 4], esi
jge 0x4f609c
cmp ebx, esi
jle 0x4f6065
jne 0x4f6149
mov eax, dword [0x547570]
lea ecx, [ebx + ebx + 2]
lea esi, [ebp + 0xc]
mov edx, ecx
mov edi, eax
shr ecx, 2
mov dword [esp + 0x1c], eax
push ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
mov dword [eax - 8], ebx
call fcn.00405590
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
xor esi, esi
mov ecx, eax
cmp word [ecx + ebx*2 - 2], 0x5c
jne 0x4f6114
mov word [ecx + ebx*2 - 2], si
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
lea esi, [ecx - 0xc]
cmp eax, 1
jle 0x4f60f4
lea ecx, [esp + 0x1c]
call fcn.004124c0
mov edx, dword [esi + 4]
lea ecx, [esp + 0x1c]
push edx
call fcn.00405530
test eax, eax
je 0x4f60f4
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x1c]
add esi, 0xc
lea ecx, [eax + eax + 2]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x1c]
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x1c]
mov word [edx + eax*2], 0
mov eax, dword [esp + 0x1c]
mov ecx, dword [edi + 0x18]
lea esi, [edi + 0x18]
pop ebp
cmp ecx, eax
pop ebx
je 0x4f6195
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x4f6134
mov edx, dword [0x547574]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x4f613b
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x4f617e
push eax
mov eax, dword [eax - 8]
push eax
mov ecx, esi
call fcn.00405870
jmp 0x4f6195
lea eax, [ebx + ebx + 0xe]
push eax
call fcn.00532695
add esp, 4
cmp eax, esi
je 0x4f6173
mov dword [eax], 1
mov word [eax + ebx*2 + 0xc], si
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
add eax, 0xc
jmp 0x4f606a
mov eax, dword [esp + 0x1c]
xor ecx, ecx
jmp 0x4f609e
mov ecx, esi
call fcn.004124c0
mov eax, dword [esp + 0x14]
mov dword [esi], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea ecx, [edi + 0x14]
push ecx
push 0
push edi
push 0x4f5fc0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [esp + 0x14]
mov ecx, dword [0x547574]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4f61da
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4f61da
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.00532222
add esp, 4
pop edi
pop esi
add esp, 8
ret 4