Function at 0x40d960
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x41bac9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
mov dword [esp + 8], ecx
push esi
push edi
mov edi, dword [esp + 0x38]
lea ecx, [esp + 0x38]
call fcn.0040d6c0
mov esi, dword [edi]
mov edx, dword [0x427ce8]
lea ebx, [edi + 8]
cmp esi, edx
mov dword [esp + 0x14], edi
mov ebp, ebx
jne 0x40d9a6
mov esi, dword [ebx]
jmp 0x40d9c4
mov eax, dword [ebx]
cmp eax, edx
je 0x40d9c4
mov ecx, dword [eax]
cmp ecx, edx
je 0x40d9ba
mov eax, ecx
mov ecx, dword [eax]
cmp ecx, edx
jne 0x40d9b2
mov esi, dword [eax + 8]
lea ebp, [eax + 8]
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::constructor_void_]
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x40da39
mov ecx, dword [edi]
mov dword [ecx + 4], eax
mov edx, dword [edi]
mov dword [eax], edx
mov ecx, dword [ebx]
cmp eax, ecx
jne 0x40d9ea
mov dword [esi + 4], eax
jmp 0x40d9ff
mov ecx, dword [eax + 4]
mov dword [esi + 4], ecx
mov ecx, dword [eax + 4]
mov dword [ecx], esi
mov edx, dword [ebx]
mov dword [ebp], edx
mov ecx, dword [ebx]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x10]
mov ecx, dword [edx + 4]
cmp dword [ecx + 4], edi
jne 0x40da10
mov dword [ecx + 4], eax
jmp 0x40da1e
mov ecx, dword [edi + 4]
cmp dword [ecx], edi
jne 0x40da1b
mov dword [ecx], eax
jmp 0x40da1e
mov dword [ecx + 8], eax
mov ecx, dword [edi + 4]
mov dword [esp + 0x14], edi
mov dword [eax + 4], ecx
mov edx, dword [edi + 0x2c]
mov ecx, dword [eax + 0x2c]
mov dword [eax + 0x2c], edx
mov dword [edi + 0x2c], ecx
jmp 0x40dac3
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 4]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
cmp dword [eax + 4], edi
jne 0x40da54
mov dword [eax + 4], esi
jmp 0x40da62
mov eax, dword [edi + 4]
cmp dword [eax], edi
jne 0x40da5f
mov dword [eax], esi
jmp 0x40da62
mov dword [eax + 8], esi
mov ebp, dword [ecx + 4]
cmp dword [ebp], edi
jne 0x40da91
mov edx, dword [0x427ce8]
mov eax, dword [ebx]
cmp eax, edx
jne 0x40da7e
mov edx, dword [edi + 4]
mov dword [ebp], edx
jmp 0x40da91
mov eax, dword [esi]
mov ecx, esi
cmp eax, edx
je 0x40da8e
mov ecx, eax
mov eax, dword [ecx]
cmp eax, edx
jne 0x40da86
mov dword [ebp], ecx
mov eax, dword [esp + 0x10]
mov ebx, dword [eax + 4]
cmp dword [ebx + 8], edi
jne 0x40dac3
mov edx, dword [0x427ce8]
mov eax, dword [edi]
cmp eax, edx
jne 0x40daae
mov ecx, dword [edi + 4]
jmp 0x40dac0
mov eax, dword [esi + 8]
mov ecx, esi
cmp eax, edx
je 0x40dac0
mov ecx, eax
mov eax, dword [ecx + 8]
cmp eax, edx
jne 0x40dab7
mov dword [ebx + 8], ecx
mov edx, dword [esp + 0x14]
mov ebx, 1
cmp dword [edx + 0x2c], ebx
jne 0x40dd5f
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 4]
cmp esi, dword [ecx + 4]
je 0x40dd5c
cmp dword [esi + 0x2c], ebx
jne 0x40dd5c
mov eax, dword [esi + 4]
cmp esi, dword [eax]
jne 0x40db69
mov eax, dword [eax + 8]
xor edi, edi
cmp dword [eax + 0x2c], edi
jne 0x40db50
mov dword [eax + 0x2c], ebx
mov edx, dword [esi + 4]
mov dword [edx + 0x2c], edi
mov eax, dword [esi + 4]
mov ecx, dword [eax + 8]
mov edx, dword [ecx]
mov dword [eax + 8], edx
mov edx, dword [ecx]
cmp edx, dword [0x427ce8]
je 0x40db20
mov dword [edx + 4], eax
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 4]
cmp eax, dword [edx + 4]
jne 0x40db37
mov dword [edx + 4], ecx
jmp 0x40db45
mov edx, dword [eax + 4]
cmp eax, dword [edx]
jne 0x40db42
mov dword [edx], ecx
jmp 0x40db45
mov dword [edx + 8], ecx
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, dword [esi + 4]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
cmp dword [ecx + 0x2c], ebx
jne 0x40dbf6
mov edx, dword [eax + 8]
cmp dword [edx + 0x2c], ebx
jne 0x40dbf6
jmp 0x40dbdb
mov eax, dword [eax]
xor edi, edi
cmp dword [eax + 0x2c], edi
jne 0x40dbc4
mov dword [eax + 0x2c], ebx
mov eax, dword [esi + 4]
mov dword [eax + 0x2c], edi
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov dword [eax], edx
mov edx, dword [ecx + 8]
cmp edx, dword [0x427ce8]
je 0x40db93
mov dword [edx + 4], eax
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 4]
cmp eax, dword [edx + 4]
jne 0x40dbaa
mov dword [edx + 4], ecx
jmp 0x40dbb9
mov edx, dword [eax + 4]
cmp eax, dword [edx + 8]
jne 0x40dbb7
mov dword [edx + 8], ecx
jmp 0x40dbb9
mov dword [edx], ecx
mov dword [ecx + 8], eax
mov dword [eax + 4], ecx
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x2c], ebx
jne 0x40dcb0
mov edx, dword [eax]
cmp dword [edx + 0x2c], ebx
jne 0x40dcb0
mov dword [eax + 0x2c], edi
mov eax, dword [esp + 0x10]
mov esi, dword [esi + 4]
mov ecx, dword [eax + 4]
cmp esi, dword [ecx + 4]
jne 0x40dae5
jmp 0x40dd5c
mov edx, dword [eax + 8]
cmp dword [edx + 0x2c], ebx
jne 0x40dc4d
mov ecx, dword [eax]
mov dword [ecx + 0x2c], ebx
mov ecx, dword [eax]
mov dword [eax + 0x2c], edi
mov edx, dword [ecx + 8]
mov dword [eax], edx
mov edx, dword [ecx + 8]
cmp edx, dword [0x427ce8]
je 0x40dc1b
mov dword [edx + 4], eax
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 4]
cmp eax, dword [edx + 4]
jne 0x40dc32
mov dword [edx + 4], ecx
jmp 0x40dc41
mov edx, dword [eax + 4]
cmp eax, dword [edx + 8]
jne 0x40dc3f
mov dword [edx + 8], ecx
jmp 0x40dc41
mov dword [edx], ecx
mov dword [ecx + 8], eax
mov dword [eax + 4], ecx
mov eax, dword [esi + 4]
mov eax, dword [eax + 8]
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x2c]
mov dword [eax + 0x2c], edx
mov ecx, dword [esi + 4]
mov dword [ecx + 0x2c], ebx
mov edx, dword [eax + 8]
mov dword [edx + 0x2c], ebx
mov eax, dword [esi + 4]
mov ecx, dword [eax + 8]
mov edx, dword [ecx]
mov dword [eax + 8], edx
mov edx, dword [ecx]
cmp edx, dword [0x427ce8]
je 0x40dc7a
mov dword [edx + 4], eax
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 4]
cmp eax, dword [edx + 4]
jne 0x40dc96
mov dword [edx + 4], ecx
mov dword [ecx], eax
jmp 0x40dd59
mov edx, dword [eax + 4]
cmp eax, dword [edx]
jne 0x40dca6
mov dword [edx], ecx
mov dword [ecx], eax
jmp 0x40dd59
mov dword [edx + 8], ecx
mov dword [ecx], eax
jmp 0x40dd59
mov ecx, dword [eax]
cmp dword [ecx + 0x2c], ebx
jne 0x40dd04
mov edx, dword [eax + 8]
mov dword [edx + 0x2c], ebx
mov ecx, dword [eax + 8]
mov dword [eax + 0x2c], edi
mov edx, dword [ecx]
mov dword [eax + 8], edx
mov edx, dword [ecx]
cmp edx, dword [0x427ce8]
je 0x40dcd5
mov dword [edx + 4], eax
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 4]
cmp eax, dword [edx + 4]
jne 0x40dcec
mov dword [edx + 4], ecx
jmp 0x40dcfa
mov edx, dword [eax + 4]
cmp eax, dword [edx]
jne 0x40dcf7
mov dword [edx], ecx
jmp 0x40dcfa
mov dword [edx + 8], ecx
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x2c]
mov dword [eax + 0x2c], edx
mov ecx, dword [esi + 4]
mov dword [ecx + 0x2c], ebx
mov edx, dword [eax]
mov dword [edx + 0x2c], ebx
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov dword [eax], edx
mov edx, dword [ecx + 8]
cmp edx, dword [0x427ce8]
je 0x40dd30
mov dword [edx + 4], eax
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 4]
cmp eax, dword [edx + 4]
jne 0x40dd47
mov dword [edx + 4], ecx
jmp 0x40dd56
mov edx, dword [eax + 4]
cmp eax, dword [edx + 8]
jne 0x40dd54
mov dword [edx + 8], ecx
jmp 0x40dd56
mov dword [edx], ecx
mov dword [ecx + 8], eax
mov dword [eax + 4], ecx
mov dword [esi + 0x2c], ebx
mov ebx, dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
lea ecx, [esp + 0x18]
call ebx
mov ebp, dword [esp + 0x14]
lea edi, [ebp + 0xc]
mov dword [esp + 0x1c], edi
mov eax, dword [edi + 0x14]
lea esi, [edi + 0x10]
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0
call fcn.0040ec30
mov ecx, dword [esi + 4]
push ecx
call fcn.0040df80
mov edx, dword [eax]
add esp, 4
lea ecx, [esp + 0x14]
push edx
call fcn.0040ec30
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
mov ecx, esi
call fcn.0040d400
mov eax, dword [esi + 4]
push eax
call sub.MFC42.DLL_operatordelete
xor eax, eax
add esp, 4
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
lea ecx, [esp + 0x14]
xor esi, esi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::constructor_void_]
mov eax, dword [0x427cf4]
dec eax
mov dword [0x427cf4], eax
jne 0x40ddf9
mov esi, dword [0x427cf0]
mov dword [0x427cf0], 0
lea ecx, [esp + 0x14]
call ebx
xor ebx, ebx
cmp esi, ebx
je 0x40de0e
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [edi + 4]
cmp ecx, ebx
je 0x40de33
mov al, byte [ecx - 1]
test al, al
je 0x40de27
cmp al, 0xff
je 0x40de27
dec al
mov byte [ecx - 1], al
jmp 0x40de33
add ecx, 0xfffffffe
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
push ebp
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x14]
add esp, 4
mov ecx, dword [eax + 0xc]
pop edi
dec ecx
pop esi
mov dword [eax + 0xc], ecx
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
pop ebp
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 8