Function at 0x41c400
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4a86f8
push 0x47eeb0
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push ebx
push esi
push edi
mov eax, dword [0x4aab30]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 0x88]
mov dword [ebp - 0x30], edi
mov byte [ebp - 0x19], al
mov dword [ebp - 0x24], eax
cmp byte [0x4b1d08], al
jne 0x41c461
push 0x4b4c80
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [0x4b1d08], 1
lea esi, [edi + 0x3f]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, byte [edi + 0x3a]
test al, 3
jne 0x41c54c
xor bl, bl
or al, 1
mov byte [edi + 0x3a], al
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
jne 0x41c774
mov dword [ebp - 4], 0
mov esi, dword [ebp + 8]
cmp byte [esi + 0x83], bl
je 0x41c4cb
mov eax, dword [edi + 0x63]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41c4a4
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 0xe]
push edx
call fcn.0047a780
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
je 0x41c768
mov eax, dword [esi + 0x8c]
mov dword [ebp - 0x20], eax
xor ebx, ebx
mov dword [ebp - 0x40], ebx
xor edx, edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], edx
mov ecx, dword [edi + 8]
mov dword [ebp - 0x48], ecx
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx + 0x8c]
mov dword [ebp - 0x20], ecx
mov byte [ebp - 0x19], dl
mov dword [ebp - 0x24], edx
mov eax, dword [edi + 0x84]
test byte [eax + 0x3a], 1
je 0x41c580
add eax, 0x3f
push eax
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call esi
mov eax, dword [edi + 0x84]
inc dword [eax + 0x2a]
mov edx, dword [edi + 0x84]
add edx, 0x3f
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi + 0x84]
test byte [eax + 0x3a], 1
je 0x41c553
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41c533
mov bl, 1
jmp 0x41c47d
mov ecx, eax
add ecx, 0x3f
push ecx
call esi
mov eax, dword [edi + 0x84]
dec dword [eax + 0x2a]
mov edx, dword [edi + 0x84]
add edx, 0x3f
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
lea ebx, [ebx]
test byte [ecx + 0x3a], 3
jne 0x41c4d4
cmp ecx, dword [ecx + 0x8c]
jne 0x41c723
mov eax, dword [edi + 0x7f]
test eax, eax
je 0x41c723
mov esi, dword [ebp - 0x44]
cmp dword [ebp - 0x34], esi
ja 0x41c723
jb 0x41c5bb
mov esi, dword [ebp - 0x38]
cmp esi, dword [ebp - 0x48]
jae 0x41c723
mov esi, dword [ebp - 0x3c]
cmp esi, dword [edi + 4]
ja 0x41c723
jb 0x41c5d1
cmp ebx, dword [edi]
jae 0x41c723
test edx, edx
jne 0x41c723
mov esi, ebx
shl esi, 4
add esi, ebx
test byte [esi + eax + 0x10], 2
je 0x41c714
mov eax, dword [ebp - 0x3c]
push eax
push ebx
mov ecx, edi
call fcn.0041d3e0
add esp, 8
test al, al
je 0x41c714
lea eax, [edi + 0x3f]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov bl, al
mov byte [ebp - 0x4c], bl
mov eax, dword [edi + 0x7f]
test eax, eax
je 0x41c685
mov ecx, dword [esi + eax]
mov dword [ebp - 0x5c], ecx
mov edx, dword [esi + eax + 4]
mov dword [ebp - 0x58], edx
mov ecx, dword [esi + eax + 8]
mov dword [ebp - 0x54], ecx
mov edx, dword [esi + eax + 0xc]
mov dword [ebp - 0x50], edx
mov bl, byte [esi + eax + 0x10]
mov byte [ebp - 0x4c], bl
test bl, 2
je 0x41c685
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [edi + 0x67]
call ecx
add esp, 4
cdq
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], edx
movsx ebx, bl
or ebx, 8
mov byte [ebp - 0x4c], bl
mov edx, dword [ebp - 0x54]
push edx
mov eax, dword [edi + 0x6b]
call eax
add esp, 4
cdq
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], edx
movsx ebx, bl
or bl, 0x10
mov byte [ebp - 0x4c], bl
lea eax, [edi + 0x3f]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, 2
je 0x41c709
mov eax, dword [ebp - 0x5c]
or eax, dword [ebp - 0x58]
je 0x41c6fc
mov eax, dword [ebp - 0x54]
or eax, dword [ebp - 0x50]
je 0x41c6fc
mov byte [ebp - 0x19], 0
lea ecx, [ebp - 0x19]
push ecx
lea edx, [ebp - 0x5c]
push edx
mov esi, dword [ebp - 0x20]
call fcn.0041e6b0
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je 0x41c6fc
mov eax, dword [esi + 0x8c]
mov dword [ebp - 0x2c], eax
cmp esi, eax
jne 0x41c6e3
cmp byte [ebp - 0x19], 0
je 0x41c6e3
push 0
push esi
call fcn.0041f2a0
add esp, 8
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x41c6fc
lea ecx, [ebp - 0x19]
push ecx
lea edx, [ebp - 0x5c]
push edx
mov esi, eax
call fcn.0041e6b0
add esp, 8
mov dword [ebp - 0x24], eax
lea esi, [ebp - 0x5c]
call fcn.0041d160
call fcn.0041d190
add dword [ebp - 0x38], 1
adc dword [ebp - 0x34], 0
mov ebx, dword [ebp - 0x40]
add ebx, 1
mov dword [ebp - 0x40], ebx
adc dword [ebp - 0x3c], 0
jmp 0x41c574
test byte [ecx + 0x3a], 3
jne 0x41c4d4
mov eax, dword [ebp - 0x20]
cmp eax, dword [eax + 0x8c]
jne 0x41c4d4
mov eax, dword [ebp - 0x48]
cmp eax, dword [edi + 8]
jne 0x41c74c
mov ecx, dword [ebp - 0x44]
cmp ecx, dword [edi + 0xc]
je 0x41c754
test edx, edx
je 0x41c4d4
test edx, edx
jne 0x41c768
push edx
push edx
push edi
push fcn.0041c210
push edx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 4], 0xfffffffe
call fcn.0041c789
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret