Function at 0x5149f4
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 4
push 0
push 0
dec ecx
jne 0x5149fd
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x514d44
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404e30
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.0055ef88
mov edx, edi
call fcn.00535604
movzx eax, byte [eax + 0x30]
dec al
je 0x514a4c
sub al, 2
je 0x514cf4
jmp 0x514d19
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.0055ef88
mov edx, edi
call fcn.00535604
cmp dword [eax + 0x20], 0
je 0x514a99
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.0055ef88
mov edx, edi
call fcn.00535604
mov edx, dword [eax + 0x20]
lea eax, [ebp - 0x20]
call fcn.004057e8
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebx + 8]
call fcn.0054253c
mov eax, dword [eax + 0x30]
pop edx
call fcn.0049ee54
mov dword [ebp - 0x1c], eax
jmp 0x514ac6
mov edx, esi
mov eax, dword [ebx + 0xc]
call fcn.0055ef88
mov edx, dword [eax + 0x40]
lea eax, [ebp - 0x24]
call fcn.004057e8
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebx + 8]
call fcn.0054253c
mov eax, dword [eax + 0x30]
pop edx
call fcn.0049ee54
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x514d19
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.00417788
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax + 0x40]
cmp eax, 8
jg 0x514b11
je 0x514b7c
add eax, 0xfffffffe
sub eax, 3
jb 0x514b24
dec eax
sub eax, 2
jb 0x514c76
jmp 0x514d19
sub eax, 0xe
je 0x514b24
sub eax, 0x17
je 0x514bf9
jmp 0x514d19
mov eax, dword [ebp - 0x1c]
mov edx, dword [0x48c2b0]
call fcn.00403fc0
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.00404ec8
cmp dword [ebp - 4], 0
jne 0x514b5d
lea eax, [ebp - 0x18]
call fcn.00413d2c
mov edx, dword [ebp + 8]
call fcn.0040a518
jmp 0x514d19
lea eax, [ebp - 0x18]
call fcn.0041568c
add esp, 0xfffffff4
fstp xword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040cc98
jmp 0x514d19
mov eax, dword [ebp - 0x1c]
mov edx, dword [0x48da94]
call fcn.00403fc0
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.00404ec8
cmp dword [ebp - 4], 0
jne 0x514bda
cmp byte [ebx + 0xe8], 0
je 0x514bb6
mov bl, 4
mov esi, dword [0x5a8148]
movzx esi, byte [esi]
jmp 0x514bba
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00415fe8
add esp, 0xfffffff8
fistp qword [esp]
wait
mov ecx, dword [ebp + 8]
mov edx, esi
mov eax, ebx
call fcn.0040cc60
jmp 0x514d19
lea eax, [ebp - 0x18]
call fcn.00415fe8
add esp, 0xfffffff8
fistp qword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040ccf4
jmp 0x514d19
mov eax, dword [ebp - 0x1c]
mov edx, dword [0x48dca8]
call fcn.00403fc0
mov ebx, eax
lea eax, [ebp - 4]
mov edx, dword [ebx + 0xe0]
call fcn.00404ec8
cmp dword [ebp - 4], 0
jne 0x514c57
cmp byte [ebx + 0xe8], 0
je 0x514c33
mov bl, 4
mov esi, dword [0x5a8148]
movzx esi, byte [esi]
jmp 0x514c37
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.00415fe8
add esp, 0xfffffff8
fistp qword [esp]
wait
mov ecx, dword [ebp + 8]
mov edx, esi
mov eax, ebx
call fcn.0040cc60
jmp 0x514d19
lea eax, [ebp - 0x18]
call fcn.00415fe8
add esp, 0xfffffff8
fistp qword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040ccf4
jmp 0x514d19
mov eax, dword [ebp - 0x1c]
mov edx, dword [0x48ca64]
call fcn.00403fc0
mov edi, eax
lea eax, [ebp - 4]
mov edx, dword [edi + 0xe0]
call fcn.00404ec8
cmp dword [ebp - 4], 0
jne 0x514cd8
cmp byte [edi + 0xe8], 0
je 0x514cb0
mov bl, 4
mov esi, dword [0x5a8148]
movzx esi, byte [esi]
jmp 0x514cb4
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x18]
call fcn.0041568c
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.0040cc28
jmp 0x514d19
lea eax, [ebp - 0x18]
call fcn.0041568c
add esp, 0xfffffff4
fstp xword [esp]
wait
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040cc98
jmp 0x514d19
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 [0x514d54]
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, dword [ebp + 8]
call fcn.0040cbc8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x514d4b
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00405628
lea eax, [ebp - 0x18]
call fcn.0041300c
lea eax, [ebp - 4]
call fcn.00404e30
ret