Function at 0x100480e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x101e58e6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push ebp
push esi
mov ebx, ecx
xor esi, esi
xor eax, eax
push edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea edi, [ebx + 0x2c]
lea ebp, [ebx + 0x5c]
mov dword [esp + 0x18], 4
jmp 0x10048124
xor esi, esi
push 0x1c
call sub.MFC42u.DLL_operatornew
add esp, 4
cmp eax, esi
je 0x10048154
mov dword [eax], 0x101fae28
mov dword [eax + 0xc], esi
mov dword [eax + 0x10], esi
mov dword [eax + 8], esi
mov dword [eax + 4], esi
mov dword [eax + 0x14], esi
mov dword [eax + 0x18], 0xa
mov dword [esp + 0x1c], eax
jmp 0x10048158
mov dword [esp + 0x1c], esi
mov esi, dword [edi + 8]
push 0xffffffffffffffff
mov ecx, edi
lea eax, [esi + 1]
push eax
call fcn.1004cd40
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x1c]
push 0
push bind
push 0
push 0
mov dword [ecx + esi*4], edx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov esi, dword [ebp + 8]
mov dword [esp + 0x20], eax
push 0xffffffffffffffff
mov ecx, ebp
lea eax, [esi + 1]
push eax
call fcn.1004ce80
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x20]
dec eax
mov dword [ecx + esi*4], edx
mov dword [esp + 0x18], eax
jne 0x10048122
mov eax, dword [0x10282758]
test eax, eax
je 0x100481d2
push str.CTaskMgr2::Initialize
push str.CTaskMgr2
push 0xffffffffffffffff
push 0x10281ec4
call fcn.100de220
add esp, 0x10
lea ebp, [ebx + 0x2b4]
xor edi, edi
mov esi, ebp
mov eax, dword [0x10282758]
test eax, eax
je 0x10048206
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
push eax
push ecx
push edi
push str.CTaskMgr2::Initialize_level__d___SharedThreadNum__lu__PrivateThreadNum__lu_
push str.CTaskMgr2
push 0xffffffffffffffff
push 0x10281ec4
call fcn.100de220
add esp, 0x1c
inc edi
add esi, 4
cmp edi, 4
jl 0x100481dc
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], ebp
mov eax, dword [ebp]
mov dword [esp + 0x1c], 0
test eax, eax
mov dword [esp + 0x20], eax
jle 0x100482eb
push 0x30
call sub.MFC42u.DLL_operatornew
mov edi, eax
add esp, 4
mov dword [esp + 0x2c], edi
test edi, edi
mov dword [esp + 0x48], 0
je 0x1004825d
mov ecx, edi
call fcn.100cba00
mov dword [edi], 0x101fae18
jmp 0x1004825f
xor edi, edi
mov edx, dword [esp + 0x10]
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], edx
mov eax, dword [ebx + 0x2b0]
mov ecx, edi
mov dword [esp + 0x48], 0xffffffff
mov dword [edi + 0x18], eax
call fcn.100cbbe0
test eax, eax
je 0x10048365
mov eax, dword [0x10282758]
test eax, eax
je 0x100482af
mov eax, dword [edi + 4]
push eax
push str.CTaskMgr2::Initialize_Create_SharedThread_ID__d_
push str.CTaskMgr2
push 0xffffffffffffffff
push 0x10281ec4
call fcn.100de220
add esp, 0x14
mov esi, dword [ebx + 0xc]
lea ebp, [ebx + 4]
push 0xffffffffffffffff
mov ecx, ebp
lea eax, [esi + 1]
push eax
call fcn.1004cc00
mov ecx, dword [ebp + 4]
mov dword [ecx + esi*4], edi
mov edx, dword [edi + 0x2c]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + edx*4 + 0x30]
lea eax, [esp + edx*4 + 0x30]
inc esi
mov dword [eax], esi
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x10048232
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
inc eax
add ebp, 4
cmp eax, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ebp
jl 0x1004821b
lea ecx, [ebx + 0x2c4]
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
mov eax, dword [edx]
test eax, eax
mov dword [esp + 0x2c], eax
jle 0x10048547
push 0x30
call sub.MFC42u.DLL_operatornew
mov edi, eax
add esp, 4
mov dword [esp + 0x28], edi
test edi, edi
mov dword [esp + 0x48], 1
je 0x1004838d
mov ecx, edi
call fcn.100cba00
mov esi, edi
mov dword [edi], 0x101fae08
mov dword [esp + 0x18], esi
jmp 0x10048399
test edi, edi
je 0x10048371
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
mov ecx, ebx
call fcn.10048680
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret
mov dword [esp + 0x18], 0
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], eax
mov ecx, dword [ebx + 0x2b0]
mov dword [esi + 0x18], ecx
mov ecx, esi
mov dword [esp + 0x48], 0xffffffff
call fcn.100cbbe0
test eax, eax
je 0x100485d7
mov eax, dword [0x10282758]
test eax, eax
je 0x100483e9
mov edx, dword [esi + 4]
push edx
push str.CTaskMgr2::Initialize_Create_PrivateThread_ID__d_
push str.CTaskMgr2
push 0xffffffffffffffff
push 0x10281ec4
call fcn.100de220
add esp, 0x14
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x1c]
mov ebp, edx
xor edi, edi
mov dword [esp + 0x28], ebp
inc ebp
cmp ebp, edi
jne 0x1004841b
cmp eax, edi
je 0x10048410
push eax
mov dword [esp + 0x28], edx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x24], edi
mov dword [ebx + 0x20], edi
jmp 0x1004851a
cmp eax, edi
jne 0x10048453
lea edi, [ebp*4]
push edi
call sub.MFC42u.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [ebx + 0x1c], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebx + 0x24], ebp
mov dword [ebx + 0x20], ebp
jmp 0x1004851a
mov ecx, dword [ebx + 0x24]
cmp ebp, ecx
jg 0x10048483
cmp edx, ebp
jge 0x10048473
mov ecx, ebp
sub ecx, edx
lea edx, [eax + edx*4]
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebx + 0x20], ebp
jmp 0x1004851a
jle 0x1004847b
sub edx, ebp
mov dword [esp + 0x24], edx
mov dword [ebx + 0x20], ebp
jmp 0x1004851a
mov eax, dword [ebx + 0x28]
cmp eax, edi
jne 0x100484ad
mov eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x100484a1
mov eax, 4
jmp 0x100484ad
cmp eax, 0x400
jle 0x100484ad
mov eax, 0x400
add eax, ecx
cmp ebp, eax
mov dword [esp + 0x14], eax
jl 0x100484bb
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x14]
lea ecx, [eax*4]
push ecx
call sub.MFC42u.DLL_operatornew
mov ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x1c]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x28], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 0x20]
mov ecx, ebp
sub ecx, edx
lea edx, [eax + edx*4]
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x1c]
push eax
call sub.MFC42u.DLL_operatordelete
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add esp, 8
mov dword [ebx + 0x1c], ecx
mov dword [ebx + 0x20], ebp
mov dword [ebx + 0x24], edx
mov eax, dword [ebx + 0x1c]
mov ecx, dword [esp + 0x28]
mov dword [eax + ecx*4], esi
mov edx, dword [esi + 0x2c]
mov esi, dword [esp + edx*4 + 0x30]
mov ecx, dword [esp + 0x2c]
lea eax, [esp + edx*4 + 0x30]
inc esi
mov dword [eax], esi
mov eax, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x10048334
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
inc eax
add edx, 4
cmp eax, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
jl 0x1004831a
mov eax, dword [ebx + 0x2ac]
test eax, eax
jne 0x10048579
lea ecx, [ebx + 0x1b0]
call fcn.1004a9e0
lea ecx, [ebx + 0x90]
call fcn.10049b90
lea ecx, [ebx + 0x120]
call fcn.1004a340
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
lea ecx, [ebx + 0x28c]
mov dword [ebx + 0x28c], edx
mov edx, dword [esp + 0x38]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
lea ecx, [ebx + 0x1f0]
call fcn.1004b2f0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret
test esi, esi
je 0x100485e3
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
mov ecx, ebx
call fcn.10048680
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x3c
ret