Function at 0x498520
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x521df9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x30]
push ebp
mov dword [esp + 8], ecx
push esi
push edi
lea ecx, [esp + 0x3c]
call fcn.00499a70
mov ebp, dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::constructor_void_]
lea ecx, [esp + 0x24]
mov dword [esp + 0x14], ebx
call ebp
mov esi, dword [ebx]
mov eax, dword [0x588c84]
cmp esi, eax
mov dword [esp + 0x30], 0
jne 0x498595
mov esi, dword [ebx + 8]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx + 4]
mov dword [esi + 4], eax
mov eax, dword [ecx + 4]
cmp dword [eax + 4], ebx
jne 0x498631
mov dword [eax + 4], esi
jmp 0x49863f
mov edi, dword [ebx + 8]
cmp edi, eax
je 0x498573
lea ecx, [esp + 0x18]
call ebp
mov eax, dword [edi]
mov ecx, dword [0x588c84]
cmp eax, ecx
je 0x4985b6
mov edi, eax
mov eax, dword [edi]
cmp eax, ecx
jne 0x4985ae
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov esi, dword [edi + 8]
cmp edi, ebx
mov dword [esp + 0x14], edi
je 0x498573
mov eax, dword [ebx]
mov dword [eax + 4], edi
mov ecx, dword [ebx]
mov dword [edi], ecx
mov eax, dword [ebx + 8]
cmp edi, eax
jne 0x4985e0
mov dword [esi + 4], edi
jmp 0x4985f7
mov edx, dword [edi + 4]
mov dword [esi + 4], edx
mov eax, dword [edi + 4]
mov dword [eax], esi
mov eax, dword [ebx + 8]
mov dword [edi + 8], eax
mov ecx, dword [ebx + 8]
mov dword [ecx + 4], edi
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 4]
cmp dword [eax + 4], ebx
jne 0x498608
mov dword [eax + 4], edi
jmp 0x498616
mov eax, dword [ebx + 4]
cmp dword [eax], ebx
jne 0x498613
mov dword [eax], edi
jmp 0x498616
mov dword [eax + 8], edi
mov eax, dword [ebx + 4]
mov dword [esp + 0x14], ebx
mov dword [edi + 4], eax
mov ecx, dword [ebx + 0x14]
mov eax, dword [edi + 0x14]
mov dword [edi + 0x14], ecx
mov dword [ebx + 0x14], eax
jmp 0x4986db
mov eax, dword [ebx + 4]
cmp dword [eax], ebx
jne 0x49863c
mov dword [eax], esi
jmp 0x49863f
mov dword [eax + 8], esi
mov eax, dword [ecx + 4]
cmp dword [eax], ebx
jne 0x498689
mov ecx, dword [ebx + 8]
mov edx, dword [0x588c84]
cmp ecx, edx
jne 0x49865a
mov edx, dword [ebx + 4]
mov dword [eax], edx
jmp 0x498689
lea ecx, [esp + 0x1c]
mov edi, esi
call ebp
mov eax, dword [esi]
mov ecx, dword [0x588c84]
cmp eax, ecx
je 0x498676
mov edi, eax
mov eax, dword [edi]
cmp eax, ecx
jne 0x49866e
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 4]
mov dword [eax], edi
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
cmp dword [eax + 8], ebx
jne 0x4986db
mov edx, dword [ebx]
mov ecx, dword [0x588c84]
cmp edx, ecx
jne 0x4986a9
mov ecx, dword [ebx + 4]
mov dword [eax + 8], ecx
jmp 0x4986db
lea ecx, [esp + 0x1c]
mov edi, esi
call ebp
mov eax, dword [esi + 8]
mov ecx, dword [0x588c84]
cmp eax, ecx
je 0x4986c7
mov edi, eax
mov eax, dword [edi + 8]
cmp eax, ecx
jne 0x4986be
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 4]
mov dword [eax + 8], edi
mov ecx, dword [esp + 0x14]
mov ebx, 1
cmp dword [ecx + 0x14], ebx
jne 0x4989fd
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 4]
cmp esi, dword [eax + 4]
je 0x4989fa
cmp dword [esi + 0x14], ebx
jne 0x4989fa
mov eax, dword [esi + 4]
cmp esi, dword [eax]
jne 0x49879c
mov edi, dword [eax + 8]
mov eax, dword [edi + 0x14]
test eax, eax
jne 0x498780
mov dword [edi + 0x14], ebx
mov ecx, dword [esi + 4]
mov dword [ecx + 0x14], 0
mov edi, dword [esi + 4]
lea ecx, [esp + 0x1c]
call ebp
mov eax, dword [edi + 8]
mov edx, dword [eax]
mov dword [edi + 8], edx
mov ecx, dword [eax]
cmp ecx, dword [0x588c84]
je 0x498746
mov dword [ecx + 4], edi
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp edi, dword [ecx + 4]
jne 0x49875d
mov dword [ecx + 4], eax
jmp 0x49876b
mov ecx, dword [edi + 4]
cmp edi, dword [ecx]
jne 0x498768
mov dword [ecx], eax
jmp 0x49876b
mov dword [ecx + 8], eax
mov dword [eax], edi
lea ecx, [esp + 0x1c]
mov dword [edi + 4], eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov eax, dword [esi + 4]
mov edi, dword [eax + 8]
mov ecx, dword [edi]
cmp dword [ecx + 0x14], ebx
jne 0x498841
mov edx, dword [edi + 8]
cmp dword [edx + 0x14], ebx
jne 0x498841
jmp 0x498822
mov edi, dword [eax]
mov eax, dword [edi + 0x14]
test eax, eax
jne 0x49880b
mov dword [edi + 0x14], ebx
mov eax, dword [esi + 4]
lea ecx, [esp + 0x20]
mov dword [eax + 0x14], 0
mov edi, dword [esi + 4]
call ebp
mov eax, dword [edi]
mov ecx, dword [eax + 8]
mov dword [edi], ecx
mov ecx, dword [eax + 8]
cmp ecx, dword [0x588c84]
je 0x4987d0
mov dword [ecx + 4], edi
mov edx, dword [edi + 4]
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], edx
mov ecx, dword [ecx + 4]
cmp edi, dword [ecx + 4]
jne 0x4987e7
mov dword [ecx + 4], eax
jmp 0x4987f6
mov ecx, dword [edi + 4]
cmp edi, dword [ecx + 8]
jne 0x4987f4
mov dword [ecx + 8], eax
jmp 0x4987f6
mov dword [ecx], eax
mov dword [eax + 8], edi
lea ecx, [esp + 0x20]
mov dword [edi + 4], eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov eax, dword [esi + 4]
mov edi, dword [eax]
mov edx, dword [edi + 8]
cmp dword [edx + 0x14], ebx
jne 0x49892a
mov eax, dword [edi]
cmp dword [eax + 0x14], ebx
jne 0x49892a
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x14], 0
mov esi, dword [esi + 4]
mov edx, dword [ecx + 4]
cmp esi, dword [edx + 4]
jne 0x4986fd
jmp 0x4989fa
mov eax, dword [edi + 8]
cmp dword [eax + 0x14], ebx
jne 0x4988ac
mov ecx, dword [edi]
mov dword [ecx + 0x14], ebx
lea ecx, [esp + 0x20]
mov dword [edi + 0x14], 0
call ebp
mov eax, dword [edi]
mov edx, dword [eax + 8]
mov dword [edi], edx
mov ecx, dword [eax + 8]
cmp ecx, dword [0x588c84]
je 0x498870
mov dword [ecx + 4], edi
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp edi, dword [ecx + 4]
jne 0x498887
mov dword [ecx + 4], eax
jmp 0x498896
mov ecx, dword [edi + 4]
cmp edi, dword [ecx + 8]
jne 0x498894
mov dword [ecx + 8], eax
jmp 0x498896
mov dword [ecx], eax
mov dword [eax + 8], edi
lea ecx, [esp + 0x20]
mov dword [edi + 4], eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov eax, dword [esi + 4]
mov edi, dword [eax + 8]
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x14]
mov dword [edi + 0x14], edx
mov eax, dword [esi + 4]
mov dword [eax + 0x14], ebx
mov ecx, dword [edi + 8]
mov dword [ecx + 0x14], ebx
mov edi, dword [esi + 4]
lea ecx, [esp + 0x20]
call ebp
mov eax, dword [edi + 8]
mov edx, dword [eax]
mov dword [edi + 8], edx
mov ecx, dword [eax]
cmp ecx, dword [0x588c84]
je 0x4988df
mov dword [ecx + 4], edi
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp edi, dword [ecx + 4]
jne 0x498902
mov dword [ecx + 4], eax
mov dword [eax], edi
mov dword [edi + 4], eax
lea ecx, [esp + 0x20]
jmp 0x4989f4
mov ecx, dword [edi + 4]
cmp edi, dword [ecx]
jne 0x498919
mov dword [ecx], eax
mov dword [eax], edi
mov dword [edi + 4], eax
lea ecx, [esp + 0x20]
jmp 0x4989f4
mov dword [ecx + 8], eax
mov dword [eax], edi
mov dword [edi + 4], eax
lea ecx, [esp + 0x20]
jmp 0x4989f4
mov eax, dword [edi]
cmp dword [eax + 0x14], ebx
jne 0x498992
mov ecx, dword [edi + 8]
mov dword [ecx + 0x14], ebx
lea ecx, [esp + 0x20]
mov dword [edi + 0x14], 0
call ebp
mov eax, dword [edi + 8]
mov edx, dword [eax]
mov dword [edi + 8], edx
mov ecx, dword [eax]
cmp ecx, dword [0x588c84]
je 0x498959
mov dword [ecx + 4], edi
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp edi, dword [ecx + 4]
jne 0x498970
mov dword [ecx + 4], eax
jmp 0x49897e
mov ecx, dword [edi + 4]
cmp edi, dword [ecx]
jne 0x49897b
mov dword [ecx], eax
jmp 0x49897e
mov dword [ecx + 8], eax
mov dword [eax], edi
lea ecx, [esp + 0x20]
mov dword [edi + 4], eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov eax, dword [esi + 4]
mov edi, dword [eax]
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x14]
mov dword [edi + 0x14], ecx
mov edx, dword [esi + 4]
lea ecx, [esp + 0x20]
mov dword [edx + 0x14], ebx
mov eax, dword [edi]
mov dword [eax + 0x14], ebx
mov edi, dword [esi + 4]
call ebp
mov eax, dword [edi]
mov ecx, dword [eax + 8]
mov dword [edi], ecx
mov ecx, dword [eax + 8]
cmp ecx, dword [0x588c84]
je 0x4989c4
mov dword [ecx + 4], edi
mov edx, dword [edi + 4]
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], edx
mov ecx, dword [ecx + 4]
cmp edi, dword [ecx + 4]
jne 0x4989db
mov dword [ecx + 4], eax
jmp 0x4989ea
mov ecx, dword [edi + 4]
cmp edi, dword [ecx + 8]
jne 0x4989e8
mov dword [ecx + 8], eax
jmp 0x4989ea
mov dword [ecx], eax
mov dword [eax + 8], edi
mov dword [edi + 4], eax
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov dword [esi + 0x14], ebx
mov esi, dword [esp + 0x14]
mov ecx, dword [0x53c120]
mov eax, dword [esi + 0xc]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x498a2e
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x498a2e
mov eax, dword [esi + 0xc]
sub eax, 0xc
push eax
call fcn.0051e1fa
add esp, 4
push esi
call fcn.0051e1fa
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x3c]
add esp, 4
mov dword [esp + 0x30], 0xffffffff
mov ecx, dword [eax + 0xc]
dec ecx
mov dword [eax + 0xc], ecx
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x24]
mov dword [esi], eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov ecx, dword [esp + 0x28]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret 8