Function at 0x4f5420
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.004f5b40
mov eax, dword [esp + 0x14]
xor esi, esi
cmp dword [eax - 8], esi
jne 0x4f5485
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4f561a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4f561a
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00531732
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 0x4f549b
cmp dword [eax - 4], esi
jge 0x4f54dc
cmp ebx, esi
jle 0x4f54a5
jne 0x4f5589
mov eax, dword [0x546560]
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 0x4f5554
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 0x4f5534
lea ecx, [esp + 0x1c]
call fcn.00412670
mov edx, dword [esi + 4]
lea ecx, [esp + 0x1c]
push edx
call fcn.00405530
test eax, eax
je 0x4f5534
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 0x4f55d5
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x4f5574
mov edx, dword [0x546564]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x4f557b
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x4f55be
push eax
mov eax, dword [eax - 8]
push eax
mov ecx, esi
call fcn.00405870
jmp 0x4f55d5
lea eax, [ebx + ebx + 0xe]
push eax
call fcn.00531ba5
add esp, 4
cmp eax, esi
je 0x4f55b3
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 0x4f54aa
mov eax, dword [esp + 0x1c]
xor ecx, ecx
jmp 0x4f54de
mov ecx, esi
call fcn.00412670
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 0x4f5400
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [esp + 0x14]
mov ecx, dword [0x546564]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4f561a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4f561a
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
pop edi
pop esi
add esp, 8
ret 4