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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x660b20
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
push ebx
push ebp
push esi
push edi
mov eax, dword [0x704e7c]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x44], ebx
lea eax, [esp + 0x17]
push eax
lea ecx, [esp + 0x1b]
push ecx
lea ecx, [esp + 0x68]
call fcn.005a9ba0
lea edx, [esp + 0x17]
push edx
lea eax, [esp + 0x1b]
push eax
lea ecx, [esp + 0x9c]
mov dword [esp + 0xc8], 0
call fcn.00452330
mov eax, dword [ebx + 0xb40]
mov edi, dword [eax]
mov ebp, dword [ebx + 0xb2c]
mov byte [esp + 0xc0], 1
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebp
jmp 0x51a610
mov esi, dword [ebx + 0xb40]
mov eax, dword [ebx + 0xb2c]
test ebp, ebp
je 0x51a624
cmp ebp, eax
je 0x51a629
call fcn.006111cc
cmp edi, esi
je 0x51a87e
test ebp, ebp
jne 0x51a872
call fcn.006111cc
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x51a64a
call fcn.006111cc
fild dword [edi + 0xc]
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x1f]
push eax
lea ecx, [esp + 0x47]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x68]
push eax
sub esp, 8
fstp dword [esp + 4]
mov ecx, ebx
fild dword [edi + 8]
fstp dword [esp]
call fcn.00517780
fild dword [edi + 0x14]
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x42]
push eax
lea ecx, [esp + 0x3b]
push ecx
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x38]
push eax
sub esp, 8
fstp dword [esp + 4]
mov ecx, ebx
fild dword [edi + 0x10]
fstp dword [esp]
call fcn.00517780
movzx ecx, word [esp + 0x3c]
mov eax, dword [esp + 0x54]
movzx edx, word [esp + 0x48]
mov ebp, dword [esp + 0x30]
shl ecx, 8
add eax, ecx
movzx ecx, word [esp + 0x34]
shl edx, 8
add ebp, edx
mov edx, dword [esp + 0x24]
shl ecx, 8
add edx, ecx
movzx ecx, word [esp + 0x40]
shl ecx, 8
add dword [esp + 0x20], ecx
cmp eax, edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x24], edx
mov ecx, eax
mov dword [esp + 0x50], eax
jg 0x51a848
cmp ebp, dword [esp + 0x20]
jg 0x51a839
mov eax, ecx
and eax, 0x800000ff
jns 0x51a71e
dec eax
or eax, 0xffffff00
inc eax
mov dword [esp + 0x58], eax
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
mov edi, eax
sar edi, 8
mov dword [esp + 0x4c], edi
mov esi, ebp
and esi, 0x800000ff
jns 0x51a748
dec esi
or esi, 0xffffff00
inc esi
mov eax, ebp
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov edx, eax
imul edx, edx, 0x64
lea ecx, [esp + 0x5c]
push ecx
push eax
add edx, edi
push edi
mov ecx, ebx
mov dword [esp + 0x34], edx
call fcn.005170e0
test al, al
je 0x51a822
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x88]
push edx
push eax
mov ecx, ebx
call fcn.00517160
test eax, eax
je 0x51a822
mov ecx, dword [esp + 0x78]
mov edi, dword [esp + 0x60]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x90]
mov dword [esp + 0x88], ecx
push eax
lea ecx, [esp + 0x68]
call fcn.00597210
mov ebx, eax
test edi, edi
je 0x51a7c2
cmp edi, dword [ebx]
je 0x51a7c7
call fcn.006111cc
mov ecx, dword [esp + 0x84]
cmp ecx, dword [ebx + 4]
jne 0x51a7ff
push 0x10000
call fcn.0060f23e
push 0x10000
mov edi, eax
push 0
push edi
call fcn.0060fff0
add esp, 0x10
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x64]
call fcn.00519980
mov dword [eax], edi
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x64]
call fcn.00519980
mov ecx, dword [esp + 0x58]
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x4c]
shl esi, 8
add esi, dword [eax]
mov byte [esi + ecx], 0xff
inc ebp
cmp ebp, dword [esp + 0x20]
jle 0x51a736
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x50]
inc ecx
cmp ecx, dword [esp + 0x24]
mov dword [esp + 0x50], ecx
jle 0x51a704
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x51a87a
call fcn.006111cc
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x51a861
call fcn.006111cc
mov edx, dword [edi]
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
mov edi, edx
jmp 0x51a610
mov eax, dword [ebp]
jmp 0x51a640
mov eax, dword [eax]
jmp 0x51a857
mov eax, dword [esp + 0x78]
mov esi, dword [eax]
mov edi, dword [esp + 0x60]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edi
mov ebp, dword [esp + 0x78]
test edi, edi
je 0x51a89e
cmp edi, dword [esp + 0x60]
je 0x51a8a3
call fcn.006111cc
cmp esi, ebp
je 0x51a94f
test edi, edi
jne 0x51a944
call fcn.006111cc
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x51a8c4
call fcn.006111cc
mov ecx, dword [esi + 0xc]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov esi, edx
shr esi, 0x1f
add esi, edx
mov edx, esi
imul edx, edx, 0x64
sub ecx, edx
mov ebp, ecx
test edi, edi
jne 0x51a94b
call fcn.006111cc
xor eax, eax
mov edi, dword [esp + 0x1c]
cmp edi, dword [eax + 0x18]
jne 0x51a8fa
call fcn.006111cc
lea eax, [esp + 0x4c]
push eax
push esi
push ebp
mov ecx, ebx
call fcn.005170e0
test al, al
je 0x51a92e
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x44]
push ecx
push edx
mov ecx, ebx
call fcn.00517160
test eax, eax
je 0x51a92e
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x44]
push eax
call fcn.00545a40
lea ecx, [esp + 0x18]
call fcn.0055b150
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
jmp 0x51a890
mov eax, dword [edi]
jmp 0x51a8ba
mov eax, dword [edi]
jmp 0x51a8ec
lea ecx, [esp + 0x60]
push ecx
call fcn.00518f40
add esp, 4
lea ecx, [esp + 0x94]
mov byte [esp + 0xc0], 0
call fcn.00456f30
lea ecx, [esp + 0x60]
mov dword [esp + 0xc0], 0xffffffff
call fcn.005b8bb0
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret