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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5ceb80
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x65a000]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x65a000]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x1c], edi
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], 0
mov word [esp + 0x40], cx
mov dword [esp + 0x80], ecx
mov dword [esp + 0x6c], 7
mov dword [esp + 0x68], ecx
mov word [esp + 0x58], cx
mov byte [esp + 0x80], 1
cmp dword [eax + 0x14], 8
mov dword [esp + 0x14], ecx
jb 0x406ebe
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x18]
call fcn.00409390
mov byte [esp + 0x80], 2
mov eax, dword [esp + 0x14]
mov esi, dword [eax - 0xc]
test esi, esi
jns 0x406ee5
push 0x80070057
call fcn.004091f0
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x406f04
push esi
lea ecx, [esp + 0x18]
call fcn.00409140
mov eax, dword [esp + 0x14]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.005a547d
mov eax, dword [esp + 0x1c]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x406edb
mov dword [eax - 0xc], esi
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov word [eax + esi*2], cx
xor eax, eax
mov word [esp + 0x28], ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ecx
cmp word [eax], cx
jne 0x406f47
xor edx, edx
jmp 0x406f5f
mov edx, eax
lea esi, [edx + 2]
lea esp, [esp]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x406f50
sub edx, esi
sar edx, 1
push edx
push eax
lea ecx, [esp + 0x30]
call fcn.004058d0
lea eax, [edi + 4]
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x84], 3
mov edi, dword [eax]
mov ecx, eax
mov dword [esp + 0x24], eax
call fcn.00408390
mov esi, eax
mov eax, dword [esp + 0x1c]
cmp esi, dword [eax + 4]
je 0x406fbe
cmp dword [esi + 0x24], 8
mov ecx, dword [esi + 0x20]
lea eax, [esi + 0x10]
jb 0x406fa0
mov eax, dword [eax]
push ecx
push eax
push dword [esp + 0x40]
push ecx
lea ecx, [esp + 0x38]
call fcn.00406530
test eax, eax
js 0x406fbe
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x20]
jmp 0x406fc8
mov esi, dword [esp + 0x20]
mov eax, dword [esi]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
cmp dword [eax], edi
jne 0x407079
xor eax, eax
push eax
mov dword [ebx + 0x14], 7
mov dword [ebx + 0x10], 0
push 0x60ec18
mov ecx, ebx
mov word [ebx], ax
call fcn.004058d0
cmp dword [esp + 0x3c], 8
jb 0x407007
push dword [esp + 0x28]
call fcn.0048166b
add esp, 4
mov byte [esp + 0x80], 1
mov edx, dword [esp + 0x14]
xor eax, eax
add edx, 0xfffffff0
mov word [esp + 0x28], ax
or ecx, 0xffffffff
lea eax, [edx + 0xc]
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 7
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x407044
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esp + 0x54], 8
jb 0x407057
push dword [esp + 0x40]
call fcn.0048166b
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.005a4646
mov esp, ebp
pop ebp
ret 8
mov edi, dword [esp + 0x1c]
push 0xffffffffffffffff
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00407b80
lea ecx, [esp + 0x40]
cmp ecx, eax
je 0x4070a6
push 0xffffffffffffffff
push 0
push eax
call fcn.00405440
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [esp + 0x40]
push eax
mov ecx, ebx
call fcn.00405250
jmp 0x406ff4