Function at 0x4a8570
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5101c6
mov eax, dword fs:[0]
push eax
sub esp, 0x140
push ebx
push esi
push edi
mov eax, dword [0x53c1a4]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x546fac]
mov edx, dword [eax + 0xc]
mov ecx, 0x546fac
call edx
xor esi, esi
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x158], esi
mov ecx, dword [eax + 0x18]
cmp ecx, esi
je 0x4a85f8
mov edx, dword [ecx]
mov eax, dword [edx + 0x30]
call eax
cmp eax, esi
je 0x4a85f8
cmp dword [eax + 0x38], 0x10
jb 0x4a85f3
mov eax, dword [eax + 0x24]
jmp 0x4a85fa
add eax, 0x24
jmp 0x4a85fa
xor eax, eax
lea ecx, [esp + 0x4c]
push eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x4c], ecx
call fcn.00407870
mov byte [esp + 0x158], 1
mov edx, dword [esp + 0x48]
cmp edx, esi
jne 0x4a8620
xor eax, eax
jmp 0x4a8634
mov eax, edx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4a8625
sub eax, ebx
sar eax, 1
mov ebx, eax
push edx
lea eax, [esp + 0x24]
call fcn.004076e0
mov byte [esp + 0x158], 0
mov eax, dword [esp + 0x48]
lea edx, [esp + 0x4c]
cmp eax, edx
je 0x4a865d
push eax
call fcn.004ead0a
add esp, 4
fldz
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x1c0]
fst dword [esp + 0x44]
fst dword [esp + 0x40]
fst dword [esp + 0x3c]
fstp dword [esp + 0x38]
test ecx, ecx
jne 0x4a8683
call fcn.00404aa0
mov ecx, eax
fild dword [edi]
mov eax, dword [esp + 0x20]
mov edx, dword [eax - 0xc]
lea esi, [esp + 0x38]
fstp dword [esp + 0x18]
push esi
fild dword [edi + 4]
mov esi, dword [ebp + 0xc]
push edx
push eax
fstp dword [esp + 0x20]
lea eax, [esp + 0x24]
fld dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esp + 0x20]
fstp dword [esp + 0x28]
call fcn.004a8990
fild dword [edi]
mov ecx, dword [ebx + 0x54]
mov eax, dword [ebx + 0x20]
fld dword [esp + 0x40]
fld st(0)
sub eax, ecx
faddp st(2)
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x4a86ec
mov edx, dword [ebx + 0x18]
add edx, ecx
mov dword [edi], edx
mov eax, dword [ebx + 0x60]
add dword [edi + 4], eax
mov esi, dword [edi + 4]
mov dword [esp + 0x14], esi
fild dword [esp + 0x14]
fadd dword [esp + 0x44]
call fcn.005075b0
mov ecx, dword [edi]
mov dword [esp + 0x18], ecx
fiadd dword [esp + 0x18]
mov dword [esp + 0x14], eax
call fcn.005075b0
mov edx, dword [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.USER32.dll_SetRect]
mov edx, dword [ebx + 0x5c]
add edx, dword [esp + 0x30]
mov esi, 0x5203f4
mov dword [edi], edx
mov edi, dword [ebp + 0x10]
add edi, 0x44
call fcn.004ddfb0
test eax, eax
je 0x4a8768
cmp dword [eax + 0x48], 0x10
jb 0x4a8752
mov eax, dword [eax + 0x34]
jmp 0x4a8755
add eax, 0x34
test eax, eax
je 0x4a8768
push eax
call fcn.004ed7cd
add esp, 4
mov dword [esp + 0x24], eax
jmp 0x4a8770
mov dword [esp + 0x24], 0
mov eax, dword [ebx + 0x20c]
lea esi, [ebx + 0x208]
push eax
lea ebx, [esp + 0x24]
mov ecx, esi
call fcn.004a84c0
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4a8793
mov dword [ecx], eax
jmp 0x4a8795
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x158], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a87c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x150]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc