Function at 0x50e3fc
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x50e740
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404c94
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.005458e8
mov edx, edi
call fcn.0052b55c
mov al, byte [eax + 0x30]
dec al
je 0x50e45a
sub al, 2
je 0x50e6fd
jmp 0x50e722
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.005458e8
mov edx, edi
call fcn.0052b55c
cmp dword [eax + 0x20], 0
je 0x50e49c
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.005458e8
mov edx, edi
call fcn.0052b55c
mov eax, dword [eax + 0x20]
push eax
mov eax, dword [ebx + 8]
call fcn.0053200c
mov eax, dword [eax + 0x30]
pop edx
call fcn.004ce3c0
mov dword [ebp - 8], eax
jmp 0x50e4be
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.005458e8
mov eax, dword [eax + 0x3c]
push eax
mov eax, dword [ebx + 8]
call fcn.0053200c
mov eax, dword [eax + 0x30]
pop edx
call fcn.004ce3c0
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x50e722
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.00416c10
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 0x40]
cmp eax, 8
jg 0x50e509
je 0x50e585
add eax, 0xfffffffe
sub eax, 3
jb 0x50e51c
dec eax
sub eax, 2
jb 0x50e67f
jmp 0x50e722
sub eax, 0xe
je 0x50e51c
sub eax, 0x17
je 0x50e602
jmp 0x50e722
mov eax, dword [ebp - 8]
mov edx, dword [0x4bdc34]
call fcn.00403fb4
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.00404d2c
cmp dword [ebp - 4], 0
jne 0x50e566
lea eax, [ebp - 0x18]
call fcn.004131a8
lea edx, [ebp - 0x118]
call fcn.00403638
lea edx, [ebp - 0x118]
mov eax, dword [ebp + 8]
call fcn.00404ef8
jmp 0x50e722
lea eax, [ebp - 0x18]
call fcn.00414af8
add esp, 0xfffffff4
fstp xword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040bf0c
jmp 0x50e722
mov eax, dword [ebp - 8]
mov edx, dword [0x4bf328]
call fcn.00403fb4
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.00404d2c
cmp dword [ebp - 4], 0
jne 0x50e5e3
cmp byte [ebx + 0xe8], 0
je 0x50e5bf
mov bl, 4
mov esi, dword [0x6f00d8]
movzx esi, byte [esi]
jmp 0x50e5c3
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00415454
add esp, 0xfffffff8
fistp qword [esp]
wait
mov ecx, dword [ebp + 8]
mov edx, esi
mov eax, ebx
call fcn.0040bed4
jmp 0x50e722
lea eax, [ebp - 0x18]
call fcn.00415454
add esp, 0xfffffff8
fistp qword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040bf64
jmp 0x50e722
mov eax, dword [ebp - 8]
mov edx, dword [0x4bf52c]
call fcn.00403fb4
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.00404d2c
cmp dword [ebp - 4], 0
jne 0x50e660
cmp byte [ebx + 0xe8], 0
je 0x50e63c
mov bl, 4
mov esi, dword [0x6f00d8]
movzx esi, byte [esi]
jmp 0x50e640
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00415454
add esp, 0xfffffff8
fistp qword [esp]
wait
mov ecx, dword [ebp + 8]
mov edx, esi
mov eax, ebx
call fcn.0040bed4
jmp 0x50e722
lea eax, [ebp - 0x18]
call fcn.00415454
add esp, 0xfffffff8
fistp qword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040bf64
jmp 0x50e722
mov eax, dword [ebp - 8]
mov edx, dword [0x4be398]
call fcn.00403fb4
mov edi, eax
lea eax, [ebp - 4]
mov edx, dword [edi + 0xe0]
call fcn.00404d2c
cmp dword [ebp - 4], 0
jne 0x50e6e1
cmp byte [edi + 0xe8], 0
je 0x50e6b9
mov bl, 4
mov esi, dword [0x6f00d8]
movzx esi, byte [esi]
jmp 0x50e6bd
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00414af8
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.0040be9c
jmp 0x50e722
lea eax, [ebp - 0x18]
call fcn.00414af8
add esp, 0xfffffff4
fstp xword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040bf0c
jmp 0x50e722
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 [0x50e750]
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, dword [ebp + 8]
call fcn.0040be3c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50e747
lea eax, [ebp - 0x18]
call fcn.00412488
lea eax, [ebp - 4]
call fcn.00404c94
ret