Function at 0x512870
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x561669
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
xor ebx, ebx
push ebx
push ebx
push 0x5b
push str.GameReadyMain_Dialog
push ebx
push edi
call fcn.004c72c0
mov byte [edi + 0x7c], bl
mov dword [esp + 0x28], ebx
push 0x94
mov dword [edi], vtable.XPReadyMainDlg.0
mov dword [edi + 0x5c], ebx
mov dword [edi + 0x60], ebx
mov dword [edi + 0x64], 0x320
mov dword [edi + 0x68], 0x258
mov dword [edi + 0x80], 0x900b0
mov dword [edi + 0x84], ebx
call fcn.00541c89
add esp, 4
mov dword [esp + 0xc], eax
cmp eax, ebx
mov byte [esp + 0x28], 1
je 0x5128f4
push eax
call fcn.00510120
jmp 0x5128f6
xor eax, eax
push eax
mov ecx, edi
mov byte [esp + 0x2c], bl
call fcn.004c9e40
push 0x380
call fcn.00541c89
add esp, 4
mov dword [esp + 0xc], eax
cmp eax, ebx
mov byte [esp + 0x28], 2
je 0x512924
push eax
call fcn.00510db0
jmp 0x512926
xor eax, eax
push eax
mov ecx, edi
mov byte [esp + 0x2c], bl
call fcn.004c9e40
push 0x88
call fcn.00541c89
add esp, 4
mov dword [esp + 0xc], eax
cmp eax, ebx
mov byte [esp + 0x28], 3
je 0x512955
mov esi, eax
call fcn.00517ab0
jmp 0x512957
xor eax, eax
push eax
mov byte [esp + 0x2c], bl
call fcn.004c75b0
mov ecx, eax
call fcn.004c9e40
mov eax, dword [0x87b40c]
cmp byte [eax + 0x23f7c], 1
jne 0x5129d7
mov esi, dword [0x87b798]
lea ecx, [esi + 0x80bc]
mov byte [eax + 0x778dc], 1
call fcn.0052b5a0
mov eax, dword [0x87b798]
mov edx, dword [0x87b40c]
mov word [esi + 0x9c], 0x3230
mov dword [esi + 0x4098], 6
mov dl, byte [edx + 0x778dc]
mov ecx, dword [eax + 0x4098]
mov byte [ecx + eax + 0x98], dl
mov edx, dword [eax + 0x4098]
inc edx
push eax
mov dword [eax + 0x4098], edx
call fcn.00446890
jmp 0x512b05
mov ebx, 0x5b
mov eax, 0x8ff808
call fcn.004c9060
xor esi, esi
jmp 0x5129f0
push esi
push 0x8ff808
mov ecx, 0x5b
call fcn.004c8d70
push eax
mov ecx, edi
call fcn.004c9e40
inc esi
cmp esi, 6
jl 0x5129f0
mov eax, dword [0x87b40c]
push ebp
mov ebp, dword [eax + 0x1a644]
call fcn.004c7160
mov esi, eax
lea ebx, [esi + 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, byte [esi + 0x2c]
test al, al
push ebx
je 0x512a3d
mov dword [esp + 0x18], 1
jmp 0x512a52
mov edx, dword [esi + 0x24]
mov esi, dword [esi + 0x1c]
mov ecx, ebp
shr ecx, 3
mov eax, dword [edx + ecx*4]
xor eax, dword [esi + ebp*4]
mov dword [esp + 0x18], eax
mov ebp, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call ebp
mov eax, dword [0x87b40c]
mov ecx, dword [eax + 0x1a638]
mov dword [esp + 0x10], ecx
call fcn.004c7160
mov esi, eax
lea ebx, [esi + 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, byte [esi + 0x2c]
test al, al
push ebx
je 0x512a89
mov esi, 1
jmp 0x512aa6
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x24]
mov esi, dword [esi + 0x1c]
mov edx, eax
shr edx, 3
mov dword [esp + 0x14], esi
mov esi, dword [ecx + edx*4]
mov edx, dword [esp + 0x14]
xor esi, dword [edx + eax*4]
call ebp
cmp dword [esp + 0x14], esi
pop ebp
jne 0x512b03
push 0
push 0x5db178
push 0x5d80f8
push 0
mov ebx, 0xc5
call fcn.00403290
push eax
call fcn.0054a821
mov esi, eax
add esp, 0x14
test esi, esi
je 0x512b66
push 0x61ae3
push 0x87e094
call fcn.004454c0
mov ecx, eax
lea ebx, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x512af0
sub ecx, ebx
push ecx
push eax
lea ecx, [esi + 0x34]
call fcn.004028a0
xor ebx, ebx
cmp byte [edi + 0x14], bl
mov byte [0x87b7d2], bl
mov dword [edi + 0x1c], 0x5d
mov dword [edi + 0x2c], ebx
mov dword [esp + 0xc], ebx
jne 0x512b5c
push ebx
push 0x5d80f8
push 0x5d8130
push ebx
push edi
call fcn.0054a821
add esp, 0x14
cmp eax, ebx
je 0x512b3e
mov ecx, dword [esp + 0xc]
mov dword [eax + 0x30], ecx
mov eax, dword [edi + 8]
mov esi, dword [eax]
cmp esi, eax
je 0x512b5c
mov ecx, dword [esi + 8]
push ebx
lea edx, [esp + 0x10]
push edx
call fcn.00417d60
mov esi, dword [esi]
cmp esi, dword [edi + 8]
jne 0x512b47
mov dword [edi + 0x88], 0xffffffff
mov ecx, dword [esp + 0x20]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 4