Function at 0x4ed4f5
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 0x4ed46d
mov edx, 4
mov eax, dword [esp + 0x60]
imul eax, edx
test eax, eax
jge 0x4ed47b
add eax, 0xf
and al, 0xf0
cmp eax, dword [0x502a10]
jne 0x4ed4a7
mov eax, dword [esp + 0x64]
cmp eax, dword [0x5405d4]
jne 0x4ed4a7
test ebp, ebp
sete al
cmp word [0x5405d2], 1
sete dl
xor eax, edx
test al, 1
je 0x4ed4ac
call fcn.004ed168
cmp dword [0x502a04], 0
je 0x4ed4d8
mov dword [0x502a1c], 0
mov edx, dword [esp + 0x6c]
mov dword [0x502a20], edx
mov eax, 1
jmp 0x4ed841
mov esi, dword [0x5029fc]
test esi, esi
jne 0x4ed5c0
add esp, 0xfffffff4
push 0x5029fc
push 0x41c230
push 1
push 0
push 0x41c210
call sub.OLE32.dll_CoCreateInstance
mov ebx, eax
add esp, 0xc
test ebx, ebx
jl 0x4ed818
add esp, 0xfffffff8
mov eax, dword [0x5029fc]
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 0x4ed56d
add esp, 0xfffffff4
mov eax, dword [0x5029fc]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [0x5029fc], 0
mov dword [0x4f5fac], 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.004eff28
add esp, 0x20
jmp 0x4ed841
add esp, 0xfffffffc
mov eax, dword [0x5029fc]
mov edx, dword [eax]
push 2
push dword [0x4f5f84]
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 [0x5029fc]
mov ecx, dword [edx]
push 0
push 0x502a00
lea eax, [esp + 0x38]
push eax
push edx
mov eax, dword [ecx + 0xc]
call eax
mov dword [0x5029f8], 1
mov eax, dword [esp + 0x6c]
mov dword [0x502a20], eax
cmp dword [0x502a0c], 0
jne 0x4ed661
add esp, 0xfffffff8
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0x4ed268
push 0
push 0
call sub.KERNEL32.dll_CreateThread
mov dword [0x502a0c], eax
add esp, 8
test eax, eax
jne 0x4ed63f
add esp, 0xfffffff4
push 0x4ed412
call fcn.00421298
call fcn.004ed168
mov dword [0x4f5fac], 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.004eff28
add esp, 0x20
jmp 0x4ed841
add esp, 0xfffffff8
push 2
push eax
call sub.KERNEL32.dll_SetThreadPriority
add esp, 8
test eax, eax
jne 0x4ed661
add esp, 0xfffffff4
push 0x4ed430
call fcn.00421298
add esp, 0x10
mov dword [0x502a14], 1
mov edx, 2
test ebp, ebp
je 0x4ed679
mov edx, 4
mov eax, edx
imul eax, dword [esp + 0x60]
test eax, eax
jge 0x4ed687
add eax, 0xf
and al, 0xf0
mov dword [0x502a10], 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 [0x5405d0], 1
test ebp, ebp
je 0x4ed6c8
mov word [0x5405d2], 2
jmp 0x4ed6d1
mov word [0x5405d2], 1
mov ecx, dword [esp + 0x64]
mov dword [0x5405d4], ecx
mov eax, ecx
imul eax, edx
mov dword [0x5405d8], eax
mov word [0x5405dc], dx
mov word [0x5405de], 0x10
mov dword [esp + 0x40], 0x5405d0
mov edx, dword [0x502a00]
test edx, edx
je 0x4ed71a
add esp, 0xfffffff8
mov eax, dword [edx]
push 0x5405d0
push edx
mov eax, dword [eax + 0x38]
call eax
add esp, 8
mov edx, dword [0x5029fc]
mov ecx, dword [edx]
push 0
push 0x502a04
lea eax, [esp + 0x38]
push eax
push edx
mov eax, dword [ecx + 0xc]
call eax
mov ebx, eax
test ebx, ebx
jge 0x4ed75e
call fcn.004ed168
mov dword [0x4f5fac], 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 0x4ed832
add esp, 0xfffffffc
mov edx, dword [0x502a04]
mov ecx, dword [edx]
lea eax, [esp + 0x1c]
push eax
push 0x41c290
push edx
mov eax, dword [ecx]
call eax
mov ebx, eax
add esp, 4
test ebx, ebx
jge 0x4ed7a8
call fcn.004ed168
mov dword [0x4f5fac], 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 0x4ed832
mov eax, dword [0x502a10]
lea edx, [eax - 1]
mov dword [esp + 0x20], edx
lea eax, [eax*2 - 1]
mov dword [esp + 0x28], eax
mov eax, dword [0x502a08]
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 0x4ed813
mov eax, dword [0x502a04]
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 0x4ed83c
call fcn.004ed168
mov dword [0x4f5fac], 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.004eff28
add esp, 0x10
jmp 0x4ed841
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
add esp, 0x4c
ret