Function at 0x4be658
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4be980
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404664
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.00505be0
mov edx, edi
call fcn.004de168
mov al, byte [eax + 0x30]
dec al
je 0x4be6ab
sub al, 2
je 0x4be93d
jmp 0x4be962
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.00505be0
mov edx, edi
call fcn.004de168
cmp dword [eax + 0x20], 0
je 0x4be6ed
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.00505be0
mov edx, edi
call fcn.004de168
mov eax, dword [eax + 0x20]
push eax
mov eax, dword [ebx + 8]
call fcn.004ea3a0
mov eax, dword [eax + 0x30]
pop edx
call fcn.0043ea60
mov dword [ebp - 8], eax
jmp 0x4be70f
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.00505be0
mov eax, dword [eax + 0x40]
push eax
mov eax, dword [ebx + 8]
call fcn.004ea3a0
mov eax, dword [eax + 0x30]
pop edx
call fcn.0043ea60
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4be962
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 8]
imul edi
add esi, eax
mov eax, dword [ebx + 0x14]
fild qword [eax + esi*8]
lea eax, [ebp - 0x18]
call fcn.00415618
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 0x40]
cmp eax, 8
jg 0x4be75a
je 0x4be7c5
add eax, 0xfffffffe
sub eax, 3
jb 0x4be76d
dec eax
sub eax, 2
jb 0x4be8bf
jmp 0x4be962
sub eax, 0xe
je 0x4be76d
sub eax, 0x17
je 0x4be842
jmp 0x4be962
mov eax, dword [ebp - 8]
mov edx, dword [0x430bb8]
call fcn.00403a38
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.004046fc
cmp dword [ebp - 4], 0
jne 0x4be7a6
lea eax, [ebp - 0x18]
call fcn.00411c34
mov edx, dword [ebp + 8]
call fcn.0040946c
jmp 0x4be962
lea eax, [ebp - 0x18]
call fcn.00413584
add esp, 0xfffffff4
fstp xword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040ad70
jmp 0x4be962
mov eax, dword [ebp - 8]
mov edx, dword [0x4322ac]
call fcn.00403a38
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.004046fc
cmp dword [ebp - 4], 0
jne 0x4be823
cmp byte [ebx + 0xe8], 0
je 0x4be7ff
mov bl, 4
mov esi, dword [0x51b910]
movzx esi, byte [esi]
jmp 0x4be803
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00413ee0
add esp, 0xfffffff8
fistp qword [esp]
wait
mov ecx, dword [ebp + 8]
mov edx, esi
mov eax, ebx
call fcn.0040ad38
jmp 0x4be962
lea eax, [ebp - 0x18]
call fcn.00413ee0
add esp, 0xfffffff8
fistp qword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040adc8
jmp 0x4be962
mov eax, dword [ebp - 8]
mov edx, dword [0x4324b0]
call fcn.00403a38
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.004046fc
cmp dword [ebp - 4], 0
jne 0x4be8a0
cmp byte [ebx + 0xe8], 0
je 0x4be87c
mov bl, 4
mov esi, dword [0x51b910]
movzx esi, byte [esi]
jmp 0x4be880
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00413ee0
add esp, 0xfffffff8
fistp qword [esp]
wait
mov ecx, dword [ebp + 8]
mov edx, esi
mov eax, ebx
call fcn.0040ad38
jmp 0x4be962
lea eax, [ebp - 0x18]
call fcn.00413ee0
add esp, 0xfffffff8
fistp qword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040adc8
jmp 0x4be962
mov eax, dword [ebp - 8]
mov edx, dword [0x43131c]
call fcn.00403a38
mov edi, eax
lea eax, [ebp - 4]
mov edx, dword [edi + 0xe0]
call fcn.004046fc
cmp dword [ebp - 4], 0
jne 0x4be921
cmp byte [edi + 0xe8], 0
je 0x4be8f9
mov bl, 4
mov esi, dword [0x51b910]
movzx esi, byte [esi]
jmp 0x4be8fd
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00413584
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, dword [ebp + 8]
push eax
mov edx, dword [edi + 0xec]
mov ecx, esi
mov eax, ebx
call fcn.0040ad00
jmp 0x4be962
lea eax, [ebp - 0x18]
call fcn.00413584
add esp, 0xfffffff4
fstp xword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040ad70
jmp 0x4be962
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 8]
imul edi
add esi, eax
mov eax, dword [ebx + 0x14]
fild qword [eax + esi*8]
fdiv dword [0x4be990]
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, dword [ebp + 8]
call fcn.0040aca0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4be987
lea eax, [ebp - 0x18]
call fcn.00410ffc
lea eax, [ebp - 4]
call fcn.00404664
ret