Function at 0x51d810
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x12c
mov al, byte [0x624a01]
test al, al
push ebx
push esi
push edi
je 0x51dedd
cmp word [0x75c140], 1
jne 0x51dedd
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x18]
mov esi, dword [ebx + 0xc]
mov dword [esp + 0xc], eax
cmp byte [ebx], 0
jns 0x51d862
mov ecx, dword [0x637d30]
mov edx, dword [0x637d2c]
push ecx
push edx
call fcn.0051c7f0
add esp, 8
mov al, byte [0x637d50]
test al, al
jne 0x51dd07
mov al, byte [0x637d52]
test al, al
jne 0x51dd07
cmp dword [0x75c0ac], 0xffff0101
jb 0x51dd07
xor eax, eax
cmp eax, 0x639158
je 0x51dcf3
mov eax, dword [0x639158]
test eax, eax
je 0x51dcf3
mov edx, ebx
call fcn.00518e40
movsx eax, ax
call fcn.0051d350
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [esi + 0x28]
not edx
and edx, 2
or edx, 1
push edx
push 0x16
push eax
call dword [ecx + 0xe4]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 7
push 0xa8
push eax
call dword [ecx + 0xe4]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 1
push 7
push eax
call dword [edx + 0xe4]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 1
push 0xe
push eax
call dword [ecx + 0xe4]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 4
push 0x17
push eax
call dword [edx + 0xe4]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 0
push 0x1c
push eax
call dword [ecx + 0xe4]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 0
push 0x1b
push eax
call dword [edx + 0xe4]
mov eax, dword [0x6b8334]
mov eax, dword [eax + 0x5c]
push 0
push 0
call fcn.0051c120
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
add esp, 8
push 3
push 1
push 0
push eax
call dword [ecx + 0x114]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 3
push 2
push 0
push eax
call dword [edx + 0x114]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 3
push 3
push 0
push eax
call dword [ecx + 0x114]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 2
push 5
push 0
push eax
call dword [edx + 0x114]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 2
push 6
push 0
push eax
call dword [ecx + 0x114]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 2
push 7
push 0
push eax
call dword [edx + 0x114]
mov edx, dword [0x638a58]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push edx
push 2
push eax
call dword [ecx + 0x104]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 3
push 1
push 2
push eax
call dword [ecx + 0x114]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 3
push 2
push 2
push eax
call dword [edx + 0x114]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 2
push 5
push 2
push eax
call dword [ecx + 0x114]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 2
push 6
push 2
push eax
call dword [edx + 0x114]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 1
push 7
push 2
push eax
call dword [ecx + 0x114]
mov ecx, dword [0x639348]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x170]
movsx edx, word [0x75c174]
movsx eax, word [0x75c178]
sub eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [0x6b8334]
fild dword [esp + 0x10]
fmul qword [0x612448]
fstp dword [esp + 0x14]
fld dword [0x612224]
fsub dword [ebx + 0x1c]
fst dword [esp + 0x10]
fmul dword [eax + 0x17c]
fld dword [eax + 0x190]
fmul dword [ebx + 0x1c]
faddp st(1)
fld dword [esp + 0x10]
fmul dword [eax + 0x180]
fld dword [eax + 0x194]
fmul dword [ebx + 0x1c]
faddp st(1)
fld dword [esp + 0x10]
fmul dword [eax + 0x184]
fld dword [eax + 0x198]
fmul dword [ebx + 0x1c]
faddp st(1)
fstp dword [esp + 0x50]
fld dword [esp + 0x10]
fmul dword [eax + 0x174]
fld dword [eax + 0x188]
fmul dword [ebx + 0x1c]
faddp st(1)
fdivr dword [0x612224]
fmul dword [esp + 0xc]
fstp dword [esp + 0x18]
fld dword [esp + 0x10]
fmul dword [eax + 0x178]
fld dword [eax + 0x18c]
mov al, byte [0x6b835c]
test al, al
fmul dword [ebx + 0x1c]
faddp st(1)
fstp dword [esp + 0x1c]
je 0x51db43
movsx ecx, word [0x75c176]
movsx edx, word [0x75c17a]
mov eax, dword [esp + 0x14]
sub edx, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], eax
fild dword [esp + 0x10]
fmul qword [0x612448]
fstp dword [esp + 0x20]
jmp 0x51db53
mov dword [esp + 0x20], 0x3f800000
mov dword [esp + 0x24], 0x3f800000
mov ecx, dword [esp + 0x50]
fxch st(1)
fstp dword [esp + 0x38]
lea edx, [esp + 0x18]
mov dword [esp + 0x28], 0
fstp dword [esp + 0x3c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
call fcn.0051d330
mov ecx, dword [0x75c1ec]
mov eax, dword [0x75c1e8]
mov edx, dword [0x75c1e4]
mov dword [esp + 0x50], ecx
mov ecx, dword [0x75c1f8]
mov dword [esp + 0x4c], eax
mov eax, dword [0x75c1f4]
mov dword [esp + 0x60], ecx
mov ecx, dword [0x75c150]
mov dword [esp + 0x48], edx
mov edx, dword [0x75c1f0]
mov dword [esp + 0x5c], eax
mov eax, dword [0x75c14c]
mov dword [esp + 0x20], ecx
mov ecx, dword [0x75c15c]
mov dword [esp + 0x58], edx
mov edx, dword [0x75c148]
mov dword [esp + 0x1c], eax
mov eax, dword [0x75c158]
mov dword [esp + 0x30], ecx
push 2
lea ecx, [esp + 0x4c]
mov dword [esp + 0x1c], edx
mov edx, dword [0x75c154]
push ecx
mov dword [esp + 0x34], eax
mov eax, dword [0x6b8344]
push 0x1b
mov dword [esp + 0x60], 0x3f800000
mov dword [esp + 0x70], 0x40400000
mov dword [esp + 0x30], 0x40000000
mov dword [esp + 0x34], edx
mov dword [esp + 0x40], 0x3f000000
mov edx, dword [eax]
push eax
call dword [edx + 0x178]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 2
lea ecx, [esp + 0x1c]
push ecx
push 4
push eax
call dword [edx + 0x178]
mov edx, dword [esp + 0xc]
mov eax, edx
mov ecx, edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x54], edx
push 1
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x54], eax
mov eax, dword [0x6b8344]
push 0
mov dword [esp + 0x5c], ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1b4]
mov edx, dword [0x6b8334]
movzx edx, byte [edx + 0x170]
mov esi, dword [0x639158]
mov esi, dword [esi + 0x84]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
and edx, 1
imul edx, edx, 0x84
mov edx, dword [edx + esi + 0x80]
push edx
push eax
call dword [ecx + 0x1ac]
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 1
push 1
push 0
push eax
call dword [ecx + 0x10c]
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 1
push 4
push 0
push eax
call dword [edx + 0x10c]
push 0
mov ecx, ebx
call fcn.005366c0
add esp, 4
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 3
push 0x17
push eax
call dword [ecx + 0xe4]
jmp 0x51dd32
fld dword [esp + 0xc]
fcomp dword [0x612514]
fnstsw ax
test ah, 0x41
jne 0x51dd20
mov dword [esp + 0xc], 0x3f666666
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 3
push 0x17
push eax
call dword [edx + 0xe4]
fld dword [esp + 0xc]
fcomp dword [0x612224]
fnstsw ax
test ah, 5
jp 0x51decc
mov eax, dword [ebx]
mov ecx, dword [ebx + 0x60]
mov dx, word [ebx + 0x64]
mov dword [esp + 0x70], ecx
and eax, 0x180
mov esi, dword [ebx + 0x70]
mov dword [esp + 0x68], eax
lea eax, [ebx + 0x7c]
mov ecx, dword [eax]
mov dword [esp + 0x11c], ecx
xor ecx, ecx
test esi, esi
mov dword [esp + 0xf4], ecx
mov dword [esp + 0xf8], ecx
mov dword [esp + 0xfc], ecx
mov dword [esp + 0x100], ecx
mov dword [esp + 0x104], ecx
mov dword [esp + 0x108], ecx
mov word [esp + 0x74], dx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x10c], ecx
mov dword [esp + 0x110], ecx
mov dword [esp + 0x114], ecx
mov dword [esp + 0x120], edx
mov edx, dword [ebx + 0x3c]
mov dword [esp + 0x124], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x118], ecx
mov dword [esp + 0x12c], edx
mov dword [esp + 0x130], eax
mov ecx, 0x1d
je 0x51ddf2
lea edi, [esp + 0x78]
rep movsd dword es:[edi], dword [esi]
jmp 0x51ddfa
xor eax, eax
lea edi, [esp + 0x78]
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x74]
test eax, eax
je 0x51de16
mov ecx, dword [eax]
mov dword [esp + 0xec], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0xf0], edx
jmp 0x51de26
xor eax, eax
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], eax
mov eax, dword [0x6b8344]
mov ecx, dword [eax]
push 0
push 0xe
push eax
call dword [ecx + 0xe4]
fld dword [0x612224]
fsub dword [esp + 0xc]
mov al, byte [0x6249cc]
test al, al
mov byte [0x6b83ce], 1
fstp dword [0x6b83d0]
je 0x51de87
cmp dword [0x75c0ac], 0xffff0101
mov byte [0x637e14], 1
mov byte [0x6b83ca], 0
jae 0x51de87
mov eax, dword [0x6b8344]
mov edx, dword [eax]
push 1
push 0x89
push eax
call dword [edx + 0xe4]
push 1
lea esi, [esp + 0x6c]
call fcn.0052a450
mov eax, dword [ebx + 0x58]
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
push eax
mov eax, dword [ebx + 0x48]
push ecx
xor ecx, ecx
mov cx, word [ebx + 0x10]
push edx
mov edx, dword [ebx + 0xc]
mov ebx, dword [ebx + 0x54]
push eax
push ecx
push edx
call fcn.0052e280
add esp, 0x1c
call fcn.0052e760
call fcn.00515900
mov ebx, dword [ebp + 8]
mov byte [0x6b83ce], 0
cmp byte [ebx], 0
jns 0x51dedd
push 0
push 0
call fcn.0051c7f0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret