Function at 0x411220
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x445448
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45b9b0]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov edi, ecx
lea ebp, [edi + 0x14c]
test ebp, ebp
mov dword [esp + 0x14], vtable.CriSecDbg.0
mov dword [esp + 0x18], ebp
je 0x411269
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [esp + 0x2c]
mov esi, dword [ebx]
xor edx, edx
cmp esi, edx
mov dword [esp + 0x24], 0
je 0x411545
mov ecx, dword [esp + 0x30]
cmp ecx, edx
je 0x411545
mov eax, dword [esi + 0x20]
add eax, 0xffffffff
cmp eax, 4
ja case.default.0x41129c
jmp dword [eax*4 + 0x41156c]
cmp dword [ecx + 0x1c], edx
je 0x4112b9
push ecx
lea ecx, [edi + 0x118]
call fcn.00405dc0
jmp case.0x41129c.4
mov ecx, dword [esi + 0x10]
add esi, 0x10
mov dword [edi + 0x34], ecx
mov edx, dword [esi + 4]
mov dword [edi + 0x38], edx
mov eax, dword [esi + 8]
mov dword [edi + 0x3c], eax
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x1c]
mov dword [edi + 0x40], edx
jmp case.0x41129c.4
mov eax, dword [esi + 0x10]
add esi, 0x10
mov dword [edi + 0x34], eax
mov ecx, dword [esi + 4]
mov dword [edi + 0x38], ecx
mov edx, dword [esi + 8]
mov dword [edi + 0x3c], edx
mov eax, dword [ebx]
mov ecx, dword [eax + 0x1c]
mov dword [edi + 0x40], ecx
push 3
mov ecx, edi
call fcn.0040f2b0
mov edx, dword [edi + 0x8c]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp case.0x41129c.4
mov esi, dword [esi + 0x24]
sub esi, edx
je 0x41133a
sub esi, 1
mov dword [edi + 0xb0], edx
je case.0x41129c.4
push 4
mov ecx, edi
mov dword [edi + 0x58], edx
call fcn.0040f2b0
jmp case.0x41129c.4
mov dword [edi + 0x58], edx
jmp case.0x41129c.4
cmp dword [esi + 0x28], edx
jbe case.0x41129c.4
mov ecx, edi
call fcn.00410710
mov ebp, eax
test ebp, ebp
jne 0x411366
lea ecx, [esp + 0x14]
call fcn.00407220
jmp 0x411553
mov eax, dword [ebx]
mov ecx, dword [eax + 0x28]
push 0xffffffffffffffff
add ecx, 0x2c
push ecx
push esi
push 3
push 0
push 0
push 0
mov ecx, ebp
call fcn.0040e350
mov edx, dword [ebx]
mov eax, dword [edx + 0x28]
push 1
add eax, 0x2c
push eax
call fcn.0040e390
mov dword [ebp + 0x1c], 0x2c
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x24]
mov ecx, dword [edi + 0x98]
cmp eax, ecx
mov dword [esp + 0x2c], eax
jne 0x411463
lea ecx, [edi + 0x78]
push ebp
call fcn.00405dc0
mov edx, dword [edi + 0x8c]
add dword [edi + 0x98], 1
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [edi + 0xa4]
lea esi, [edi + 0x9c]
mov dword [esi + 0xc], eax
mov eax, dword [eax + 8]
mov dword [esi + 0x10], eax
cmp dword [esi + 0xc], esi
je 0x4114eb
lea ebx, [ebx]
mov ecx, dword [esi + 0xc]
mov eax, ecx
sub eax, esi
push 0
neg eax
push 0x45a36c
sbb eax, eax
push section..data
and eax, ecx
push 0
push eax
call fcn.0042fdf5
mov eax, dword [eax + 0x10]
mov dword [ebx], eax
mov ecx, dword [eax + 0x24]
add esp, 0x14
cmp ecx, dword [edi + 0x98]
jne 0x4114eb
push ebp
mov ecx, esi
call fcn.00405df0
push ebp
lea ecx, [edi + 0x78]
call fcn.00405dc0
mov edx, dword [edi + 0x8c]
add dword [edi + 0x98], 1
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [eax + 8]
mov dword [esi + 0x10], eax
cmp dword [esi + 0xc], esi
jne 0x4113f0
jmp 0x4114eb
jae 0x41146f
push ebp
mov ecx, edi
call fcn.0040ee30
jmp 0x4114eb
lea esi, [edi + 0x9c]
mov ecx, esi
call fcn.00405e20
test eax, eax
je 0x41148a
push ebp
mov ecx, esi
call fcn.00405dc0
jmp 0x4114eb
mov eax, dword [esi + 8]
cmp eax, esi
mov dword [esi + 0xc], eax
mov ecx, dword [eax + 8]
mov dword [esi + 0x10], ecx
je 0x4114e3
lea ebx, [ebx]
mov ecx, dword [esi + 0xc]
mov eax, ecx
sub eax, esi
push 0
neg eax
push 0x45a36c
sbb eax, eax
push section..data
and eax, ecx
push 0
push eax
call fcn.0042fdf5
mov eax, dword [eax + 0x10]
mov edx, dword [esp + 0x40]
add esp, 0x14
mov dword [ebx], eax
cmp dword [eax + 0x24], edx
ja 0x411520
mov eax, dword [esi + 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [eax + 8]
mov dword [esi + 0x10], eax
cmp dword [esi + 0xc], esi
jne 0x4114a0
push ebp
mov ecx, esi
call fcn.00405dc0
mov ebp, dword [esp + 0x18]
mov dword [ebx], 0
cmp dword [edi + 0x1c], 0
je 0x41150e
mov ecx, edi
call fcn.0040e240
mov ecx, dword [esp + 0x30]
push ecx
mov ecx, edi
call fcn.00410f00
test ebp, ebp
je 0x411541
add ebp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x411556
push ebp
mov ecx, esi
call fcn.0040e620
jmp 0x4114eb
push 2
mov ecx, edi
call fcn.00411180
test ebp, ebp
je 0x411541
add ebp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x411556
cmp ebp, edx
je 0x411553
add ebp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 8