Function at 0x4d7421
Capabilities:
Create thread

Disassembly:
sub esp, 0x4c
push ebp
push edi
push esi
push ebx
mov ebp, dword [esp + 0x68]
mov dword [esp + 0x18], 0
mov edx, 2
test ebp, ebp
je 0x4d7399
mov edx, 4
mov eax, dword [esp + 0x60]
imul eax, edx
test eax, eax
jge 0x4d73a7
add eax, 0xf
and al, 0xf0
cmp eax, dword [0x4ec4b8]
jne 0x4d73d3
mov eax, dword [esp + 0x64]
cmp eax, dword [0x5247d4]
jne 0x4d73d3
test ebp, ebp
sete al
cmp word [0x5247d2], 1
sete dl
xor eax, edx
test al, 1
je 0x4d73d8
call fcn.004d7094
cmp dword [0x4ec4ac], 0
je 0x4d7404
mov dword [0x4ec4c4], 0
mov edx, dword [esp + 0x6c]
mov dword [0x4ec4c8], edx
mov eax, 1
jmp 0x4d776d
mov esi, dword [0x4ec4a4]
test esi, esi
jne 0x4d74ec
add esp, 0xfffffff4
push 0x4ec4a4
push 0x41a950
push 1
push 0
push 0x41a930
call sub.OLE32.dll_CoCreateInstance
mov ebx, eax
add esp, 0xc
test ebx, ebx
jl 0x4d7744
add esp, 0xfffffff8
mov eax, dword [0x4ec4a4]
mov edx, dword [eax]
push 0
push eax
mov eax, dword [edx + 0x28]
call eax
mov ebx, eax
add esp, 8
test ebx, ebx
jge 0x4d7499
add esp, 0xfffffff4
mov eax, dword [0x4ec4a4]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [0x4ec4a4], 0
mov dword [0x4dff98], 0
add esp, 0xfffffffc
mov ecx, dword [esp + 0x7c]
push ecx
push ebp
mov eax, dword [esp + 0x7c]
push eax
mov edx, dword [esp + 0x7c]
push edx
call fcn.004d9e54
add esp, 0x20
jmp 0x4d776d
add esp, 0xfffffffc
mov eax, dword [0x4ec4a4]
mov edx, dword [eax]
push 2
push dword [0x4dff70]
push eax
mov eax, dword [edx + 0x18]
call eax
add esp, 4
lea edi, [esp + 0x30]
mov eax, esi
cld
mov ecx, 5
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], 0x14
mov dword [esp + 0x34], 1
mov edx, dword [0x4ec4a4]
mov ecx, dword [edx]
push 0
push 0x4ec4a8
lea eax, [esp + 0x38]
push eax
push edx
mov eax, dword [ecx + 0xc]
call eax
mov dword [0x4ec4a0], 1
mov eax, dword [esp + 0x6c]
mov dword [0x4ec4c8], eax
cmp dword [0x4ec4b4], 0
jne 0x4d758d
add esp, 0xfffffff8
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0x4d7194
push 0
push 0
call sub.KERNEL32.dll_CreateThread
mov dword [0x4ec4b4], eax
add esp, 8
test eax, eax
jne 0x4d756b
add esp, 0xfffffff4
push 0x4d733e
call fcn.0041f898
call fcn.004d7094
mov dword [0x4dff98], 0
mov edx, dword [esp + 0x7c]
push edx
push ebp
mov ecx, dword [esp + 0x7c]
push ecx
mov eax, dword [esp + 0x7c]
push eax
call fcn.004d9e54
add esp, 0x20
jmp 0x4d776d
add esp, 0xfffffff8
push 2
push eax
call sub.KERNEL32.dll_SetThreadPriority
add esp, 8
test eax, eax
jne 0x4d758d
add esp, 0xfffffff4
push 0x4d735c
call fcn.0041f898
add esp, 0x10
mov dword [0x4ec4bc], 1
mov edx, 2
test ebp, ebp
je 0x4d75a5
mov edx, 4
mov eax, edx
imul eax, dword [esp + 0x60]
test eax, eax
jge 0x4d75b3
add eax, 0xf
and al, 0xf0
mov dword [0x4ec4b8], eax
mov dword [esp + 0x30], 0x14
mov dword [esp + 0x34], 0x18108
add eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 0
mov word [0x5247d0], 1
test ebp, ebp
je 0x4d75f4
mov word [0x5247d2], 2
jmp 0x4d75fd
mov word [0x5247d2], 1
mov ecx, dword [esp + 0x64]
mov dword [0x5247d4], ecx
mov eax, ecx
imul eax, edx
mov dword [0x5247d8], eax
mov word [0x5247dc], dx
mov word [0x5247de], 0x10
mov dword [esp + 0x40], 0x5247d0
mov edx, dword [0x4ec4a8]
test edx, edx
je 0x4d7646
add esp, 0xfffffff8
mov eax, dword [edx]
push 0x5247d0
push edx
mov eax, dword [eax + 0x38]
call eax
add esp, 8
mov edx, dword [0x4ec4a4]
mov ecx, dword [edx]
push 0
push 0x4ec4ac
lea eax, [esp + 0x38]
push eax
push edx
mov eax, dword [ecx + 0xc]
call eax
mov ebx, eax
test ebx, ebx
jge 0x4d768a
call fcn.004d7094
mov dword [0x4dff98], 0
mov eax, dword [esp + 0x6c]
push eax
push ebp
mov edx, dword [esp + 0x6c]
push edx
mov ecx, dword [esp + 0x6c]
push ecx
jmp 0x4d775e
add esp, 0xfffffffc
mov edx, dword [0x4ec4ac]
mov ecx, dword [edx]
lea eax, [esp + 0x1c]
push eax
push 0x41a9b0
push edx
mov eax, dword [ecx]
call eax
mov ebx, eax
add esp, 4
test ebx, ebx
jge 0x4d76d4
call fcn.004d7094
mov dword [0x4dff98], 0
mov eax, dword [esp + 0x6c]
push eax
push ebp
mov edx, dword [esp + 0x6c]
push edx
mov ecx, dword [esp + 0x6c]
push ecx
jmp 0x4d775e
mov eax, dword [0x4ec4b8]
lea edx, [eax - 1]
mov dword [esp + 0x20], edx
lea eax, [eax*2 - 1]
mov dword [esp + 0x28], eax
mov eax, dword [0x4ec4b0]
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
add esp, 0xfffffffc
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx]
lea eax, [esp + 0x24]
push eax
push 2
push edx
mov eax, dword [ecx + 0xc]
call eax
mov ebx, eax
add esp, 0xfffffff8
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
add esp, 0xc
test ebx, ebx
jl 0x4d773f
mov eax, dword [0x4ec4ac]
mov edx, dword [eax]
push 1
push 0
push 0
push eax
mov eax, dword [edx + 0x30]
call eax
mov ebx, eax
test ebx, ebx
jge 0x4d7768
call fcn.004d7094
mov dword [0x4dff98], 0
mov ecx, dword [esp + 0x6c]
push ecx
push ebp
mov eax, dword [esp + 0x6c]
push eax
mov edx, dword [esp + 0x6c]
push edx
call fcn.004d9e54
add esp, 0x10
jmp 0x4d776d
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
add esp, 0x4c
ret