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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1005acf8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x1006e020]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov eax, dword [0x1006eb44]
mov dword [esp + 0x18], eax
mov ebx, eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x20], ebx
cmp byte [ebp + 0xc], 0
mov byte [esp + 0x38], 1
je 0x100055fe
mov esi, dword [ebp + 8]
push esi
lea ecx, [esp + 0x20]
call fcn.10004e10
mov edi, eax
lea eax, [esp + 0x18]
mov byte [esp + 0x38], 2
call fcn.10015ac0
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x1c]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x100055c1
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x100055c1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov edi, dword [esp + 0x18]
cmp dword [edi - 8], 0
jne 0x1000574c
lea edx, [ebx - 0xc]
cmp edx, 0x1006eb34
je 0x100055f1
lea esi, [ebx - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x100055f1
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea eax, [edi - 0xc]
cmp eax, 0x1006eb34
jmp 0x10005945
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 4]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 9
add edi, 4
push 0x110a
push ecx
call esi
test eax, eax
je 0x10005625
push eax
mov edx, edi
call fcn.100086e0
mov edx, dword [eax + 8]
cmp dword [edx - 8], 0
mov ebx, eax
je 0x100056ab
mov ecx, dword [eax + 0xc]
mov edi, dword [eax + 0x10]
mov eax, dword [edi]
push ecx
push 3
push 0x110a
push eax
xor ebx, ebx
call esi
test eax, eax
je 0x100056ab
push eax
mov edx, edi
call fcn.100086e0
mov ebx, eax
test ebx, ebx
setne al
test al, al
jne 0x100056ab
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x10005684
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x10005684
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x18]
lea edx, [eax - 0xc]
cmp edx, 0x1006eb34
je 0x1000595e
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x1000595e
push esi
jmp 0x10005956
lea eax, [esp + 0x1c]
push eax
mov ecx, ebx
call fcn.10005290
mov edi, eax
lea eax, [esp + 0x18]
mov byte [esp + 0x38], 3
call fcn.10015ac0
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x1c]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x100056f9
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x100056f9
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [esp + 0x1c]
mov eax, ebx
call fcn.100015f0
mov edi, eax
lea eax, [esp + 0x20]
mov byte [esp + 0x38], 4
call fcn.10015ac0
mov eax, dword [esp + 0x1c]
lea edx, [eax - 0xc]
cmp edx, 0x1006eb34
je 0x10005741
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10005741
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov esi, dword [ebp + 8]
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov eax, dword [0x1006eb44]
mov dword [esp + 0x1c], eax
cmp byte [ebp + 0xc], 0
mov byte [esp + 0x38], 5
je 0x10005771
lea ecx, [esi + 0x2c]
push ecx
lea ecx, [esp + 0x20]
mov edx, edi
call fcn.10016a60
jmp 0x10005780
push ebx
push edi
lea edx, [esi + 0x2c]
push edx
lea ecx, [esp + 0x28]
call fcn.100165f0
test al, al
mov eax, dword [esp + 0x1c]
je 0x100058f9
cmp dword [eax - 8], 0
je 0x100058f9
mov eax, dword [0x1006eb44]
mov dword [esp + 0x14], eax
cmp byte [ebp + 0xc], 0
mov byte [esp + 0x38], 6
je 0x100057b9
lea edi, [esp + 0x18]
lea eax, [esp + 0x14]
call fcn.10015ac0
jmp 0x10005802
lea ecx, [esp + 0x14]
push ecx
push esi
lea ecx, [esp + 0x28]
call fcn.10006bb0
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 8]
mov ecx, dword [edi - 8]
push edi
lea ecx, [ecx + eax + 2]
lea ebx, [esp + 0x18]
call fcn.10015350
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edi, ebx
call fcn.10011c20
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [edi - 8], eax
mov word [edi + eax*2], 0
lea eax, [esp + 0x1c]
push eax
mov ecx, 0x10070c58
call fcn.10007f30
lea edi, [esp + 0x14]
call fcn.10015ac0
push 0
push 1
lea ecx, [esp + 0x24]
push ecx
mov edx, edi
push edx
mov ecx, esi
call fcn.10005980
test al, al
jne 0x1000585a
lea esi, [esp + 0x14]
call fcn.10015b40
lea esi, [esp + 0x1c]
call fcn.10015b40
lea esi, [esp + 0x20]
call fcn.10015b40
lea esi, [esp + 0x18]
call fcn.10015b40
jmp 0x1000595e
lea eax, [esp + 0x24]
push eax
add esi, 0x34
lea eax, [esp + 0x18]
call fcn.10008b30
mov eax, dword [esp + 0x24]
test eax, eax
mov edi, dword [esi + 4]
je 0x1000587a
cmp eax, esi
je 0x10005880
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [esp + 0x28], edi
je 0x10005831
lea esi, [esp + 0x24]
call fcn.10009440
mov eax, dword [eax + 4]
test eax, eax
je 0x10005831
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
push ecx
push 9
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax]
push 0x110b
push ecx
mov dword [esp + 0x38], eax
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x24]
call fcn.1000cd70
lea esi, [esp + 0x14]
call fcn.10015b40
lea esi, [esp + 0x1c]
call fcn.10015b40
lea esi, [esp + 0x20]
call fcn.10015b40
lea esi, [esp + 0x18]
call fcn.10015b40
mov al, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea edx, [eax - 0xc]
cmp edx, 0x1006eb34
je 0x1000591b
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x1000591b
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea eax, [ebx - 0xc]
cmp eax, 0x1006eb34
je 0x1000593c
lea esi, [ebx - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x1000593c
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [edi - 0xc]
cmp ecx, 0x1006eb34
je 0x1000595e
add edi, 0xfffffff4
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x1000595e
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
xor al, al
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8