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

Disassembly:
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
cmp eax, ecx
je 0x504afe
mov edx, dword [ecx - 4]
mov eax, dword [ecx - 8]
mov dword [esp + 0x10], edx
mov edx, dword [ecx - 0xc]
mov dword [esp + 0x18], ecx
mov ecx, dword [ecx]
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov edx, eax
sub edx, ecx
add edx, edx
mov ecx, edx
mov edx, dword [esp + 0x14]
sub ecx, edx
mov edx, dword [esp + 0x10]
sub ecx, edx
mov edx, dword [esp + 0x20]
add ecx, edx
add ecx, eax
sar ecx, 1
mov dword [esp + 0x20], ecx
lea ecx, [edx + eax*4]
add eax, ecx
mov ecx, dword [esp + 0x10]
sar eax, 1
lea edx, [ecx + ecx]
sub edx, eax
mov eax, dword [esp + 0x14]
sub ecx, eax
add edx, eax
sar ecx, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov eax, esi
shl eax, 0xc
cdq
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
mov ecx, edx
shl eax, 4
mov dword [esp + 0x28], ecx
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x14]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
mov edx, dword [esp + 0x1c]
sar ecx, 0x1f
mov ecx, dword [edx - 8]
add eax, ecx
mov ecx, dword [esp + 0x30]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x30]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov eax, edx
mov ecx, dword [esp + 0x1c]
sar eax, 0x1f
mov eax, dword [edi]
add esi, ebp
add eax, edx
mov dword [edi], eax
mov eax, esi
sar eax, 0x10
add ebx, eax
add edi, 4
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x18]
and esi, 0xffff
cmp ecx, eax
mov dword [esp + 0x1c], eax
je 0x504c21
mov ecx, eax
mov dword [esp + 0x18], ecx
mov edx, dword [ecx - 4]
mov eax, dword [ecx - 8]
mov dword [esp + 0x10], edx
mov edx, dword [ecx - 0xc]
mov ecx, dword [ecx]
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov edx, eax
sub edx, ecx
add edx, edx
mov ecx, edx
mov edx, dword [esp + 0x14]
sub ecx, edx
mov edx, dword [esp + 0x10]
sub ecx, edx
mov edx, dword [esp + 0x20]
add ecx, edx
add ecx, eax
sar ecx, 1
mov dword [esp + 0x20], ecx
lea ecx, [edx + eax*4]
add eax, ecx
mov ecx, dword [esp + 0x10]
sar eax, 1
lea edx, [ecx + ecx]
sub edx, eax
mov eax, dword [esp + 0x14]
sub ecx, eax
add edx, eax
sar ecx, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov eax, esi
shl eax, 0xc
cdq
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
mov ecx, edx
shl eax, 4
mov dword [esp + 0x28], ecx
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x14]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
mov edx, dword [esp + 0x1c]
sar ecx, 0x1f
mov ecx, dword [edx - 8]
add eax, ecx
mov ecx, dword [esp + 0x30]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x30]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov eax, edx
mov ecx, dword [esp + 0x1c]
sar eax, 0x1f
mov eax, dword [edi]
add esi, ebp
add eax, edx
mov dword [edi], eax
mov eax, esi
sar eax, 0x10
add ebx, eax
add edi, 4
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x18]
and esi, 0xffff
cmp ecx, eax
mov dword [esp + 0x1c], eax
je 0x504d44
mov ecx, eax
mov dword [esp + 0x18], ecx
mov edx, dword [ecx - 4]
mov eax, dword [ecx - 8]
mov dword [esp + 0x10], edx
mov edx, dword [ecx - 0xc]
mov ecx, dword [ecx]
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov edx, eax
sub edx, ecx
add edx, edx
mov ecx, edx
mov edx, dword [esp + 0x14]
sub ecx, edx
mov edx, dword [esp + 0x10]
sub ecx, edx
mov edx, dword [esp + 0x20]
add ecx, edx
add ecx, eax
sar ecx, 1
mov dword [esp + 0x20], ecx
lea ecx, [edx + eax*4]
add eax, ecx
mov ecx, dword [esp + 0x10]
sar eax, 1
lea edx, [ecx + ecx]
sub edx, eax
mov eax, dword [esp + 0x14]
sub ecx, eax
add edx, eax
sar ecx, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov eax, esi
shl eax, 0xc
cdq
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
mov ecx, edx
shl eax, 4
mov dword [esp + 0x28], ecx
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x14]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
mov edx, dword [esp + 0x1c]
sar ecx, 0x1f
mov ecx, dword [edx - 8]
add eax, ecx
mov ecx, dword [esp + 0x30]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x30]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov eax, edx
mov ecx, dword [esp + 0x1c]
sar eax, 0x1f
mov eax, dword [edi]
add esi, ebp
add eax, edx
mov dword [edi], eax
mov eax, esi
sar eax, 0x10
add ebx, eax
add edi, 4
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x18]
and esi, 0xffff
cmp ecx, eax
mov dword [esp + 0x1c], eax
je 0x504e67
mov ecx, eax
mov dword [esp + 0x18], ecx
mov edx, dword [ecx - 4]
mov eax, dword [ecx - 8]
mov dword [esp + 0x10], edx
mov edx, dword [ecx - 0xc]
mov ecx, dword [ecx]
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov edx, eax
sub edx, ecx
add edx, edx
mov ecx, edx
mov edx, dword [esp + 0x14]
sub ecx, edx
mov edx, dword [esp + 0x10]
sub ecx, edx
mov edx, dword [esp + 0x20]
add ecx, edx
add ecx, eax
sar ecx, 1
mov dword [esp + 0x20], ecx
lea ecx, [edx + eax*4]
add eax, ecx
mov ecx, dword [esp + 0x10]
sar eax, 1
lea edx, [ecx + ecx]
sub edx, eax
mov eax, dword [esp + 0x14]
sub ecx, eax
add edx, eax
sar ecx, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov eax, esi
shl eax, 0xc
cdq
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
mov ecx, edx
shl eax, 4
mov dword [esp + 0x28], ecx
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x14]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
sar ecx, 0x1f
mov ecx, dword [esp + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x28]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x28]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, edx
mov eax, edx
mov edx, dword [esp + 0x1c]
sar ecx, 0x1f
mov ecx, dword [edx - 8]
add eax, ecx
mov ecx, dword [esp + 0x30]
shl eax, 4
push ecx
mov ecx, dword [esp + 0x30]
cdq
push ecx
push edx
push eax
call fcn.004eb110
mov ecx, dword [edi]
mov eax, edx
sar eax, 0x1f
add esi, ebp
add ecx, edx
mov eax, esi
mov dword [edi], ecx
mov ecx, dword [esp + 0x1c]
add edi, 4
sar eax, 0x10
add ebx, eax
and esi, 0xffff
lea edx, [ecx + eax*4]
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x34], eax
jne 0x504a8f
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0xb4]
mov ecx, ebx
sub ecx, eax
mov eax, ebx
sub eax, dword [edx + 0x10]
cmp ecx, 3
jl 0x504f62
cmp eax, 3
jl 0x504f4e
xor ecx, ecx
jmp 0x504f56
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + ebx*4 - 0xc]
cmp eax, 2
mov dword [edx + 0x28], ecx
jl 0x504f76
xor ecx, ecx
jmp 0x504f7e
cmp ecx, 2
jl 0x504f8a
mov ecx, dword [edx + 0x30]
cmp eax, 2
mov dword [edx + 0x28], ecx
jl 0x504f76
xor ecx, ecx
jmp 0x504f7e
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + ebx*4 - 8]
cmp eax, 1
mov dword [edx + 0x2c], ecx
jl 0x504fa4
xor eax, eax
jmp 0x504fac
cmp ecx, 1
jl 0x504faf
mov ecx, dword [edx + 0x2c]
cmp eax, 1
mov dword [edx + 0x28], ecx
mov ecx, dword [edx + 0x30]
mov dword [edx + 0x2c], ecx
jl 0x504fa4
xor eax, eax
jmp 0x504fac
mov eax, dword [esp + 0x38]
mov eax, dword [eax + ebx*4 - 4]
mov dword [edx + 0x30], eax
mov eax, dword [esp + 0xb4]
mov ecx, dword [esp + 0xbc]
mov dword [eax + 4], ebx
mov dword [eax + 8], esi
cmp dword [esp + 0x44], ecx
jl 0x502c7d
mov eax, dword [esp + 0x44]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret