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

Disassembly:
sub esp, 0x44
mov eax, dword [esp + 0x54]
imul eax, eax
push ebx
push ebp
push esi
push edi
cdq
mov edi, eax
mov ebx, edx
mov ecx, ebx
shld ecx, eax, 1
add eax, eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], eax
shld ecx, eax, 1
add eax, eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x68]
imul eax, eax
cdq
mov esi, eax
mov ebp, edx
mov ecx, ebp
shld ecx, eax, 1
add eax, eax
mov dword [esp + 0x2c], ecx
push dword [esp + 0x2c]
mov dword [esp + 0x2c], eax
push dword [esp + 0x2c]
shld ecx, eax, 1
add eax, eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x6c]
cdq
mov ecx, edx
mov dword [esp + 0x20], eax
push ecx
push eax
mov dword [esp + 0x2c], ecx
call fcn.0050a7c0
and dword [esp + 0x24], 0
mov ecx, eax
and dword [esp + 0x14], 0
shrd esi, ebp, 1
mov dword [esp + 0x68], edx
shld dword [esp + 0x68], ecx, 1
sar ebp, 1
add ecx, ecx
sub esi, eax
mov dword [esp + 0x10], ecx
sbb ebp, edx
add esi, dword [esp + 0x44]
mov edx, dword [esp + 0x58]
adc ebp, dword [esp + 0x48]
shrd edi, ebx, 1
mov dword [esp + 0x30], esi
sar ebx, 1
sub edi, ecx
sbb ebx, dword [esp + 0x68]
add edi, dword [esp + 0x28]
adc ebx, dword [esp + 0x2c]
xor ecx, ecx
and dword [esp + 0x20], ecx
test byte [edx + 0xd8], 4
mov dword [esp + 0x64], ecx
je 0x51ed59
test ebx, ebx
jg 0x51ec4f
jl 0x51eb44
test edi, edi
jae 0x51ec4f
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x18]
add esi, ecx
add eax, dword [esp + 0x5c]
push esi
push eax
push edx
mov dword [esp + 0x58], eax
call fcn.0051cb4d
mov eax, dword [esp + 0x68]
sub eax, dword [esp + 0x24]
push esi
push eax
push dword [esp + 0x6c]
mov dword [esp + 0x68], eax
call fcn.0051cb4d
mov ecx, dword [esp + 0x7c]
add esp, 0x18
mov eax, ecx
or eax, dword [esp + 0x20]
je 0x51ebad
mov esi, dword [esp + 0x60]
sub esi, ecx
push esi
push dword [esp + 0x50]
push dword [esp + 0x60]
call fcn.0051cb4d
push esi
push dword [esp + 0x60]
push dword [esp + 0x6c]
call fcn.0051cb4d
mov ecx, dword [esp + 0x7c]
add esp, 0x18
mov esi, dword [esp + 0x24]
add ecx, 1
mov eax, dword [esp + 0x14]
adc dword [esp + 0x20], 0
add esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x30]
adc eax, dword [esp + 0x40]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], eax
test ebp, ebp
jg 0x51ebe5
jl 0x51ebdf
test edx, edx
jae 0x51ebe5
add edi, esi
adc ebx, eax
jmp 0x51ec25
add dword [esp + 0x18], 0xffffffff
mov ecx, dword [esp + 0x34]
adc dword [esp + 0x1c], 0xffffffff
sub dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x38]
sbb dword [esp + 0x68], ecx
mov ecx, esi
sub ecx, dword [esp + 0x10]
sbb eax, dword [esp + 0x68]
add ecx, dword [esp + 0x28]
adc eax, dword [esp + 0x2c]
add edi, ecx
mov ecx, dword [esp + 0x64]
adc ebx, eax
sub edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
sbb ebp, dword [esp + 0x68]
add edx, esi
adc ebp, eax
add edx, dword [esp + 0x44]
mov dword [esp + 0x30], edx
adc ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x58]
test ebx, ebx
jl 0x51eb44
jg 0x51ec4b
test edi, edi
jb 0x51eb44
mov edx, dword [esp + 0x58]
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x60]
mov esi, dword [esp + 0x5c]
add eax, ecx
push eax
add esi, ebp
mov dword [esp + 0x54], eax
push esi
push edx
call fcn.0051cb4d
mov eax, dword [esp + 0x6c]
sub eax, dword [esp + 0x70]
push eax
push esi
push dword [esp + 0x6c]
mov dword [esp + 0x64], eax
call fcn.0051cb4d
mov esi, dword [esp + 0x34]
mov eax, ebp
add esp, 0x18
or eax, esi
je 0x51ecb8
mov esi, dword [esp + 0x5c]
push dword [esp + 0x50]
sub esi, ebp
push esi
push dword [esp + 0x60]
call fcn.0051cb4d
push dword [esp + 0x58]
push esi
push dword [esp + 0x6c]
call fcn.0051cb4d
mov esi, dword [esp + 0x34]
add esp, 0x18
mov eax, dword [esp + 0x10]
add ebp, 0xffffffff
mov ecx, dword [esp + 0x68]
mov edx, edi
adc esi, 0xffffffff
sub eax, dword [esp + 0x34]
mov dword [esp + 0x10], eax
sbb ecx, dword [esp + 0x38]
sub edx, eax
mov eax, ebx
mov dword [esp + 0x1c], esi
sbb eax, ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], eax
test ebx, ebx
jg 0x51ed2a
jl 0x51ecf4
test edi, edi
jae 0x51ed2a
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x24]
add ecx, 1
mov edx, dword [esp + 0x14]
adc dword [esp + 0x20], 0
add eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x50]
adc edx, dword [esp + 0x40]
add edi, eax
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x64], ecx
adc ebx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], edx
jmp 0x51ed32
mov ecx, dword [esp + 0x64]
mov edi, edx
mov ebx, eax
add edi, dword [esp + 0x28]
mov edx, dword [esp + 0x58]
adc ebx, dword [esp + 0x2c]
test esi, esi
jg 0x51ec53
jl 0x51ef96
test ebp, ebp
jae 0x51ec53
jmp 0x51ef96
test ebx, ebx
jg 0x51ee74
jl 0x51ed6b
test edi, edi
jae 0x51ee74
mov edx, dword [esp + 0x18]
lea eax, [edx*2 + 1]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x5c]
sub eax, edx
mov dword [esp + 0x30], eax
lea eax, [edx*2 + 1]
push eax
mov eax, dword [esp + 0x64]
add eax, ecx
push eax
push dword [esp + 0x38]
push dword [esp + 0x64]
call fcn.0051d42a
mov ecx, dword [esp + 0x74]
add esp, 0x10
mov eax, ecx
or eax, dword [esp + 0x20]
je 0x51edce
push dword [esp + 0x50]
mov eax, dword [esp + 0x64]
sub eax, ecx
push eax
push dword [esp + 0x38]
push dword [esp + 0x64]
call fcn.0051d42a
mov ecx, dword [esp + 0x74]
add esp, 0x10
mov eax, dword [esp + 0x24]
add ecx, 1
mov edx, dword [esp + 0x14]
adc dword [esp + 0x20], 0
add eax, dword [esp + 0x3c]
mov dword [esp + 0x64], ecx
adc edx, dword [esp + 0x40]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], edx
test ebp, ebp
jg 0x51ee06
jl 0x51edfc
test esi, esi
jae 0x51ee06
add edi, eax
adc ebx, edx
mov edx, dword [esp + 0x18]
jmp 0x51ee50
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
add edx, 0xffffffff
mov dword [esp + 0x18], edx
adc dword [esp + 0x1c], 0xffffffff
sub dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x38]
sbb dword [esp + 0x68], ecx
mov ecx, eax
sub ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
sbb eax, dword [esp + 0x68]
add ecx, dword [esp + 0x28]
adc eax, dword [esp + 0x2c]
add edi, ecx
mov ecx, dword [esp + 0x64]
adc ebx, eax
sub esi, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
sbb ebp, dword [esp + 0x68]
add esi, eax
adc ebp, dword [esp + 0x14]
add esi, dword [esp + 0x44]
adc ebp, dword [esp + 0x48]
test ebx, ebx
jl 0x51ed6f
jg 0x51ee70
test edi, edi
jb 0x51ed6f
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x60]
mov esi, ecx
mov ebp, dword [esp + 0x18]
add eax, esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x44], eax
sub ecx, esi
mov esi, dword [esp + 0x5c]
inc ecx
add esi, ebp
push ecx
push dword [esp + 0x48]
mov dword [esp + 0x50], ecx
push esi
push edx
call fcn.0051d476
push dword [esp + 0x58]
mov eax, dword [esp + 0x74]
sub eax, dword [esp + 0x78]
push eax
push esi
push dword [esp + 0x74]
mov dword [esp + 0x70], eax
call fcn.0051d476
mov esi, dword [esp + 0x3c]
mov eax, ebp
add esp, 0x20
or eax, esi
je 0x51eefa
push dword [esp + 0x48]
mov esi, dword [esp + 0x60]
push dword [esp + 0x48]
sub esi, ebp
push esi
push dword [esp + 0x64]
call fcn.0051d476
push dword [esp + 0x58]
push dword [esp + 0x64]
push esi
push dword [esp + 0x74]
call fcn.0051d476
mov esi, dword [esp + 0x3c]
add esp, 0x20
mov eax, dword [esp + 0x10]
add ebp, 0xffffffff
mov ecx, dword [esp + 0x68]
mov edx, edi
adc esi, 0xffffffff
sub eax, dword [esp + 0x34]
mov dword [esp + 0x10], eax
sbb ecx, dword [esp + 0x38]
sub edx, eax
mov eax, ebx
mov dword [esp + 0x1c], esi
sbb eax, ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], eax
test ebx, ebx
jg 0x51ef6c
jl 0x51ef36
test edi, edi
jae 0x51ef6c
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x24]
add ecx, 1
mov edx, dword [esp + 0x14]
adc dword [esp + 0x20], 0
add eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x50]
adc edx, dword [esp + 0x40]
add edi, eax
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x64], ecx
adc ebx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], edx
jmp 0x51ef74
mov ecx, dword [esp + 0x64]
mov edi, edx
mov ebx, eax
add edi, dword [esp + 0x28]
mov edx, dword [esp + 0x58]
adc ebx, dword [esp + 0x2c]
test esi, esi
mov esi, dword [esp + 0x30]
jg 0x51ee88
jl 0x51ef96
test ebp, ebp
jae 0x51ee88
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 0x14