Function at 0x65995060
Capabilities:
Access peb ldr_data

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 0xc]
jbe 0x6599535c
sub esp, 0x48
mov ecx, dword [esp + 0x4c]
test byte [ecx], al
lea edi, [ecx + 0x44]
mov dword [esp + 0x44], edi
mov edx, dword [0x65a9c1d0]
test edx, edx
jne 0x65995099
mov dword [ecx + 0x44], 0
jmp 0x659950a0
xor eax, eax
call fcn.659cac10
lea eax, [0x65a9c088]
mov dword [esp], eax
call fcn.65982400
mov eax, dword [esp + 4]
test eax, eax
jne 0x659950d2
mov eax, dword [esp + 0x4c]
mov dword [eax + 0xe4], 0
mov dword [eax + 0xe8], 0
add esp, 0x48
ret
nop
call fcn.659cbac0
mov eax, dword [esp]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 4]
mov dword [esp + 0x18], ecx
lea edx, [0x65a9ca64]
mov dword [esp], edx
mov dword [esp + 4], 0xffffffff
call fcn.65982520
mov eax, dword [esp + 8]
cmp dword [0x65a9ca58], eax
je 0x65995345
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
mov dword [esp + 4], 2
mov dword [esp + 8], 4
call fcn.659ae120
mov eax, dword [esp + 0x4c]
mov byte [eax + 0x64], 1
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
mov ecx, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x54]
test byte [ecx], al
add ecx, 0xb84
mov dword [esp], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 4], ecx
call fcn.659964f0
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0x4c]
mov dword [esp], edx
mov dword [esp + 4], 4
mov dword [esp + 8], 2
call fcn.659ae120
lea eax, [0x65a9c870]
mov dword [esp], eax
call fcn.65982600
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
movsd xmm0, qword [esp + 0x38]
movsd qword [esp + 0x30], xmm0
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.659c66a0
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax + 0xe4]
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 0xe8]
mov dword [esp + 0x28], edx
movsd xmm0, qword [esp + 0x30]
mulsd xmm0, qword [esp + 8]
movsd qword [esp], xmm0
call fcn.659c6600
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x2c]
mov edx, ecx
add ecx, eax
mov ebx, ecx
add ecx, 1
mov ebp, dword [esp + 0xc]
mov esi, dword [esp + 0x4c]
mov dword [esi + 0xe4], ecx
add edx, eax
mov eax, dword [esp + 0x28]
adc eax, ebp
add ebx, 1
adc eax, 0
mov dword [esi + 0xe8], eax
lea eax, [0x65a9ca64]
mov dword [esp], eax
mov dword [esp + 4], 1
call fcn.65982520
mov eax, dword [esp + 8]
mov ecx, dword [0x65a9ca58]
cmp ecx, eax
jb 0x6599532f
jne 0x6599528e
mov dword [esp], 0
call fcn.659934b0
movzx eax, byte [esp + 4]
test al, al
jne 0x6599528e
mov ecx, dword [0x65a9c1d0]
test ecx, ecx
jne 0x65995281
mov eax, dword [esp + 0x4c]
mov dword [eax + 0x44], eax
jmp 0x6599528e
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x4c]
call fcn.659cac10
call fcn.659cbac0
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 0x54]
mov ecx, dword [esp]
mov edx, dword [esp + 0x14]
mov ebx, ecx
sub ecx, edx
mov dword [esp + 0x24], ecx
mov ebp, dword [eax + 0xb68]
mov esi, ebp
add ebp, ecx
mov edi, dword [esp + 4]
mov ecx, dword [eax + 0xb6c]
mov dword [eax + 0xb68], ebp
sub ebx, edx
mov edx, dword [esp + 0x18]
sbb edi, edx
mov edx, dword [esp + 0x24]
add esi, edx
adc ecx, edi
mov dword [eax + 0xb6c], ecx
test ecx, ecx
setg dl
sete bl
cmp ebp, 0x1388
xchg esi, ebx
seta bl
xchg esi, ebx
and ebx, esi
or edx, ebx
test dl, dl
je 0x6599532b
mov dword [esp + 0x40], eax
lea eax, [0x65a9c838]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], ebp
call fcn.659824c0
mov eax, dword [esp + 0x40]
mov dword [eax + 0xb68], 0
mov dword [eax + 0xb6c], 0
add esp, 0x48
ret
lea eax, [0x65a15c11]
mov dword [esp], eax
mov dword [esp + 4], 0x17
call fcn.659ab0e0
lea eax, [0x65a14a99]
mov dword [esp], eax
mov dword [esp + 4], 0x13
call fcn.659ab0e0
nop
call fcn.659c84b0
jmp fcn.65995060