Function at 0x4a7f00
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x50f946
mov eax, dword fs:[0]
push eax
sub esp, 0x140
push ebx
push esi
push edi
mov eax, dword [0x53a1a4]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x544fac]
mov edx, dword [eax + 0xc]
mov ecx, 0x544fac
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 0x4a7f88
mov edx, dword [ecx]
mov eax, dword [edx + 0x30]
call eax
cmp eax, esi
je 0x4a7f88
cmp dword [eax + 0x38], 0x10
jb 0x4a7f83
mov eax, dword [eax + 0x24]
jmp 0x4a7f8a
add eax, 0x24
jmp 0x4a7f8a
xor eax, eax
lea ecx, [esp + 0x4c]
push eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x4c], ecx
call fcn.00407810
mov byte [esp + 0x158], 1
mov edx, dword [esp + 0x48]
cmp edx, esi
jne 0x4a7fb0
xor eax, eax
jmp 0x4a7fc4
mov eax, edx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4a7fb5
sub eax, ebx
sar eax, 1
mov ebx, eax
push edx
lea eax, [esp + 0x24]
call fcn.00407680
mov byte [esp + 0x158], 0
mov eax, dword [esp + 0x48]
lea edx, [esp + 0x4c]
cmp eax, edx
je 0x4a7fed
push eax
call fcn.004ea5da
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 0x4a8013
call fcn.00404970
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.004a8320
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 0x4a807c
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.00506e90
mov ecx, dword [edi]
mov dword [esp + 0x18], ecx
fiadd dword [esp + 0x18]
mov dword [esp + 0x14], eax
call fcn.00506e90
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, 0x51f11c
mov dword [edi], edx
mov edi, dword [ebp + 0x10]
add edi, 0x44
call fcn.004dd860
test eax, eax
je 0x4a80f8
cmp dword [eax + 0x48], 0x10
jb 0x4a80e2
mov eax, dword [eax + 0x34]
jmp 0x4a80e5
add eax, 0x34
test eax, eax
je 0x4a80f8
push eax
call fcn.004ed09d
add esp, 4
mov dword [esp + 0x24], eax
jmp 0x4a8100
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.004a7e50
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4a8123
mov dword [ecx], eax
jmp 0x4a8125
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 0x4a8153
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